{
"id": "pub.chive.graph.expandSubgraph",
"defs": {
"main": {
"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": {
"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": {
"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"
}
}
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1,
"revision": 1
}