Graph examples
← All examples7 graph examples, each on its own page. Every example has the request, the response shape, side-by-side cURL / Python / TypeScript / Go, and notes on common mistakes.
7 work today. All seven endpoints land on the same adjacency substrate - they differ only in the traversal shape and what they return.
Every endpoint below requires a [[relations]] block on the schema - the relation must be declared before any traversal can resolve. See schemas/reference#relations for the shape. Without a matching relation, the engine returns 404.
Direct adjacency-list lookup. The fastest graph query on the substrate - one hop, one read.
Who points at this row? The mirror of neighbors. Requires bidirectional=true on the relation (default).
Every node reachable within max_depth hops, with the depth at which each was found.
Is X connected to Y at all? Returns a boolean. Short-circuits on the first match.
Single shortest-path cost between two nodes under a caller-supplied edge-weight map.
Every distinct path from src to dst. Hard-capped at max_paths to avoid exponential blowup.
PageRank scores over a subgraph you scope explicitly via the nodes= parameter.