Docs menu · Reference

Reads one edge by its (src, edge_type, dst) triple, returning its weight, properties, and last-write commit coordinates. A missing edge reads back as no data. Accepts as_of for time travel.

Optional reads distinguish present data from missing data. When version or timestamp facts exist on the executor output, SDK mappings should preserve them.

Examples

Read an edge, or nothing if absent.

CLI

$ strata graph create social
$ strata graph add-node social alice
$ strata graph add-node social bob
$ strata graph add-edge social alice knows bob
$ strata graph get-edge social alice knows bob
$ strata graph get-edge social alice knows absent

Wire

{"graph":"social","type":"graph_create"}
{"graph":"social","node_id":"alice","type":"graph_add_node"}
{"graph":"social","node_id":"bob","type":"graph_add_node"}
{"dst":"bob","edge_type":"knows","graph":"social","src":"alice","type":"graph_add_edge"}
{"dst":"bob","edge_type":"knows","graph":"social","src":"alice","type":"graph_get_edge"}
{"dst":"absent","edge_type":"knows","graph":"social","src":"alice","type":"graph_get_edge"}

Parameters

NameTypeRequiredDescription
as_ofintegernoOptional timestamp in microseconds. Reads the graph state visible at that instant.
dststringyesDestination node id.
edge_typestringyesEdge type.
graphstringyesGraph name.
srcstringyesSource node id.

Plus the optional scope: branch and space (default to the session branch and the "default" space).

Returns

Maybe<GraphEdgeDataOutput> — a miss returns nothing rather than raising.

Errors

Invocation

  • CLI: strata graph get-edge
  • Wire type: graph_get_edge

agents: this page as markdown → /docs/reference/graph/edge/get.md