created_at by default; sorting switches to updated_at when updated_since is provided.
POST /revisions/:id/data/query (Command: list_session_graph_elements)
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
engine | string | Yes | Must be workflow_blobhub. |
command | string | Yes | Must be list_session_graph_elements. |
session_id | string | Yes | The ID of the session that owns the graph envelope. |
alias | string | Yes | Alias of the graph session object. |
type | string | No | Filter by element type: "vertex" or "edge". Omit to return both. |
ascending | boolean | No | Sort direction. Default false (descending — most-recently-created or most-recently-updated first). |
cursor | string | No | Opaque pagination cursor returned by a previous call. |
updated_since | string | No | Return only elements with updated_at > updated_since (ISO 8601). Useful for incremental delta syncs. |
ids_only | boolean | No | When true, returns lightweight element_ids objects (element_id, type, rev) instead of full element objects. Useful for reconciliation. |
updated_since — pass the timestamp of the last-known mutation to retrieve only elements added or
changed since that point. This is the recommended pattern for incremental client syncs after receiving
a session_graph_changed event.
ids_only — when you only need to know which elements exist (e.g. to reconcile a local cache),
set ids_only: true. The response switches from elements to element_ids (lightweight objects
with element_id, type, and rev) and is significantly smaller for large graphs.
Response
Whenids_only is false (default):
| Parameter | Type | Description |
|---|---|---|
elements | array of object | Page of graph elements. Sorted by created_at normally; by updated_at when updated_since is set. |
cursor | string or null | Pagination cursor; null when this is the last page. |
ids_only is true:
| Parameter | Type | Description |
|---|---|---|
element_ids | array of object | Page of lightweight element records (element_id, type, rev) sorted by created_at. |
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 — traverse the graph with a query AST.
- List Session Graph Neighbors — fetch neighbors of a set of vertices.
- Get Session Graph Element — fetch a single element by id.
- Get Session Graph Elements — fetch multiple elements by id.
session_graph_changedevent — real-time delta; useupdated_sinceto fetch the changed elements.

