Skip to main content
Fetch the neighbors of a set of vertices in a graph session object.

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

direction — controls which edges are traversed (default: "both"):
  • "out" — edges where from_id is in from (outgoing).
  • "in" — edges where to_id is in from (incoming).
  • "both" — both directions. When paginating with direction: "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

Errors

  • invalid_graph_envelope — the alias does not exist or its value.type is not "graph".
  • invalid_cursor — the cursor is malformed or has expired.

Example

See also