pub.chive.graph.getHierarchy

lexicons.governance.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
{
  "description": "Get hierarchical tree structure for nodes of a specific subkind",
  "output": {
    "encoding": "application/json",
    "schema": {
      "properties": {
        "relationSlug": {
          "description": "Relation used for hierarchy",
          "type": "string"
        },
        "roots": {
          "description": "Root nodes with children",
          "items": {
            "ref": "#hierarchyItem",
            "type": "ref"
          },
          "type": "array"
        },
        "subkind": {
          "description": "Subkind of hierarchy",
          "type": "string"
        }
      },
      "required": [
        "roots",
        "subkind",
        "relationSlug"
      ],
      "type": "object"
    }
  },
  "parameters": {
    "properties": {
      "relationSlug": {
        "default": "broader",
        "description": "Relation slug for hierarchy traversal",
        "type": "string"
      },
      "subkind": {
        "description": "Subkind to get hierarchy for (e.g., field)",
        "type": "string"
      }
    },
    "required": [
      "subkind"
    ],
    "type": "params"
  },
  "type": "query"
}
hierarchyItem object

Hierarchy node with recursive children

Properties

depth integer Required

Depth in hierarchy (0 = root)

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

Lexicon Garden

@