pub.chive.graph.expandSubgraph

chive.pub

Documentation

Expand a subgraph from root URIs using breadth-first search, returning discovered nodes and edges.

main query

Expand a subgraph from root URIs using breadth-first search, returning discovered nodes and edges.

Parameters

depth integer Optional

Maximum BFS depth.

edgeTypes array of string Optional

Filter by edge relation slugs. If omitted, all types included.

maxNodes integer Optional

Maximum nodes to return.

rootUris array of string Required

Starting node URIs for BFS expansion.

Output

Encodingapplication/json
edges array Required

No description available.

nodes array Required

No description available.

truncated boolean Required

Whether result was capped at maxNodes.

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
Maximum BFS depth.
Filter by edge relation slugs. If omitted, all types included.
Maximum nodes to return.
Starting node URIs for BFS expansion.
View raw schema
{
  "type": "query",
  "output": {
    "schema": {
      "type": "object",
      "required": [
        "nodes",
        "edges",
        "truncated"
      ],
      "properties": {
        "edges": {
          "type": "array",
          "items": {
            "ref": "#subgraphEdge",
            "type": "ref"
          }
        },
        "nodes": {
          "type": "array",
          "items": {
            "ref": "#subgraphNode",
            "type": "ref"
          }
        },
        "truncated": {
          "type": "boolean",
          "description": "Whether result was capped at maxNodes."
        }
      }
    },
    "encoding": "application/json"
  },
  "parameters": {
    "type": "params",
    "required": [
      "rootUris"
    ],
    "properties": {
      "depth": {
        "type": "integer",
        "default": 2,
        "maximum": 5,
        "minimum": 1,
        "description": "Maximum BFS depth."
      },
      "maxNodes": {
        "type": "integer",
        "default": 100,
        "maximum": 200,
        "minimum": 1,
        "description": "Maximum nodes to return."
      },
      "rootUris": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "maxLength": 10,
        "description": "Starting node URIs for BFS expansion."
      },
      "edgeTypes": {
        "type": "array",
        "items": {
          "type": "string"
        },
        "description": "Filter by edge relation slugs. If omitted, all types included."
      }
    }
  },
  "description": "Expand a subgraph from root URIs using breadth-first search, returning discovered nodes and edges."
}
subgraphEdge object

No description available.

Properties

label string Optional

No description available.

relationSlug string Required

No description available.

sourceUri string Required

No description available.

targetUri string Required

No description available.

uri string Required

No description available.

weight integer Optional

No description available.

minimum: 0maximum: 100
View raw schema
{
  "type": "object",
  "required": [
    "uri",
    "sourceUri",
    "targetUri",
    "relationSlug"
  ],
  "properties": {
    "uri": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "weight": {
      "type": "integer",
      "maximum": 100,
      "minimum": 0
    },
    "sourceUri": {
      "type": "string"
    },
    "targetUri": {
      "type": "string"
    },
    "relationSlug": {
      "type": "string"
    }
  }
}
subgraphNode object

No description available.

Properties

description string Optional

No description available.

kind string Required

No description available.

label string Required

No description available.

metadata unknown Optional

No description available.

subkind string Optional

No description available.

uri string Required

No description available.

View raw schema
{
  "type": "object",
  "required": [
    "uri",
    "label",
    "kind"
  ],
  "properties": {
    "uri": {
      "type": "string"
    },
    "kind": {
      "type": "string"
    },
    "label": {
      "type": "string"
    },
    "subkind": {
      "type": "string"
    },
    "metadata": {
      "type": "unknown"
    },
    "description": {
      "type": "string"
    }
  }
}

Lexicon Garden

@