GraphRAG

Read a renderable subgraph of a collection's knowledge graph.

Returns nodes and edges of the knowledge graph for visualization (issue #11529). With label "*" (the default) returns the whole-graph view, degree-ranked and capped at max_nodes with is_truncated set; with a specific entity name returns the BFS neighborhood around that node (used by the viewer's expand-on-click). Read-only; node ids (entity names) and edge (source, target) pairs are the stable addresses a future edit API will target.

get/graph/{collection_id}

Request

Path parameters

collection_idstring uuid required

The collection whose graph to read.

Query parameters

labelstring

Entity name to center the subgraph on, or "*" for the whole-graph view.

max_depthinteger

BFS depth when label is a specific entity.

max_nodesinteger

Node cap for the returned subgraph (server clamps to its limit).

Response

Successful operation

is_truncatedboolean required

True when the graph exceeded max_nodes and was degree-capped.

total_nodesinteger nullable

Total entities in the full graph (the nodes above are degree-ranked and capped at max_nodes). Null unless this is a truncated whole-graph view -- a focused subgraph or a complete (untruncated) graph carries no separate total.

total_relationshipsinteger nullable

Total relationships in the full graph. Null unless this is a truncated whole-graph view.

Changes

No recorded changes to this operation across all 1 revision of this API.