pub.chive.graph.getHierarchy

chive.pub

Documentation

Get hierarchical tree structure for nodes of a specific subkind

main query

Get hierarchical tree structure for nodes of a specific subkind

Parameters

relationSlug string Optional

Relation slug for hierarchy traversal

subkind string Required

Subkind to get hierarchy for (e.g., field)

Output

Encodingapplication/json
relationSlug string Required

Relation used for hierarchy

roots array Required

Root nodes with children

subkind string Required

Subkind of hierarchy

Try It

Requests are sent directly from your browser. Some servers may block requests due to CORS.

Base URL for XRPC calls (e.g., https://api.bsky.social)
Parameters
Relation slug for hierarchy traversal
Subkind to get hierarchy for (e.g., field)
View raw schema
{
  "type": "query",
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "roots",
        "subkind",
        "relationSlug"
      ],
      "properties": {
        "roots": {
          "type": "array",
          "items": {
            "ref": "#hierarchyItem",
            "type": "ref"
          },
          "description": "Root nodes with children"
        },
        "subkind": {
          "type": "string",
          "description": "Subkind of hierarchy"
        },
        "relationSlug": {
          "type": "string",
          "description": "Relation used for hierarchy"
        }
      }
    },
    "encoding": "application/json"
  },
  "parameters": {
    "type": "params",
    "required": [
      "subkind"
    ],
    "properties": {
      "subkind": {
        "type": "string",
        "description": "Subkind to get hierarchy for (e.g., field)"
      },
      "relationSlug": {
        "type": "string",
        "default": "broader",
        "description": "Relation slug for hierarchy traversal"
      }
    }
  },
  "description": "Get hierarchical tree structure for nodes of a specific subkind"
}
hierarchyItem object

Hierarchy node with recursive children

Properties

depth integer Required

Depth in hierarchy (0 = root)

View raw schema
{
  "type": "object",
  "required": [
    "node",
    "children",
    "depth"
  ],
  "properties": {
    "node": {
      "ref": "pub.chive.graph.listNodes#graphNode",
      "type": "ref",
      "description": "Node data"
    },
    "depth": {
      "type": "integer",
      "description": "Depth in hierarchy (0 = root)"
    },
    "children": {
      "type": "array",
      "items": {
        "ref": "#hierarchyItem",
        "type": "ref"
      },
      "description": "Child hierarchy items"
    }
  },
  "description": "Hierarchy node with recursive children"
}

Lexicon Garden

@