Docs menu · Reference

Reads the graph’s ontology: its status (draft or frozen) plus every declared object type and link type with their property definitions. Returns no data before any type has been declared. 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 the ontology’s status.

CLI

$ strata graph create g
$ strata graph ontology define-object-type g person
$ strata graph ontology get g

Wire

{"graph":"g","type":"graph_create"}
{"graph":"g","name":"person","type":"graph_define_object_type"}
{"graph":"g","type":"graph_get_ontology"}

Parameters

NameTypeRequiredDescription
as_ofintegernoOptional timestamp in microseconds. Reads the graph state visible at that instant.
graphstringyesGraph name.

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

Returns

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

Errors

Invocation

  • CLI: strata graph ontology get
  • Wire type: graph_get_ontology

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