POST /revisions/:id/data/query (Command: list_session_graph_neighbors)
Returns the edges incident to the given source vertices and the vertices on the far end of those
edges. The response is paginated and can be filtered by edge direction and type.
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
engine | string | Yes | Must be workflow_blobhub. |
command | string | Yes | Must be list_session_graph_neighbors. |
session_id | string | Yes | The ID of the session that owns the graph envelope. |
alias | string | Yes | Alias of the graph session object. |
from | array of string | Yes | Source vertex ids whose neighbors to fetch. |
direction | string | No | Edge traversal direction: "out", "in", or "both" (default). |
label | string | No | Filter edges by label. Omit to return all edge types. |
neighbor_label | string | No | Filter neighbor vertices by label. |
cursor | string | No | Opaque pagination cursor returned by a previous call. |
limit | integer | No | Maximum number of edges to return. Server enforces its own maximum. |
direction — controls which edges are traversed (default: "both"):
"out"— edges wherefrom_idis infrom(outgoing)."in"— edges whereto_idis infrom(incoming)."both"— both directions. When paginating withdirection: "both", the cursor is a composite token that tracks progress through both sets independently; always pass back the cursor verbatim.
label and neighbor_label may be combined to narrow results further (e.g. only
"depends_on" edges leading to vertices labelled "task").
Response
| Parameter | Type | Description |
|---|---|---|
edges | array of object | The matching edges, in insertion order. |
vertices | array of object | The neighbor vertices referenced by the returned edges (deduped). |
cursor | string or null | Pagination cursor; null when this is the last page. |
Errors
invalid_graph_envelope— the alias does not exist or itsvalue.typeis not"graph".invalid_cursor— the cursor is malformed or has expired.
Example
See also
- Graph session object — envelope shape and element schema.
- Apply Session Graph Mutations — write vertices and edges.
- Query Session Graph — multi-hop traversal with a query AST.
- List Session Graph Elements — paginate all elements.
- Get Session Graph Element — fetch a single element by id.
- Get Session Graph Elements — fetch multiple elements by id.

