Docs menu · Reference

Declares an object type in the graph’s ontology: a name plus property definitions (value_type, required). While the ontology is a draft, redefining a type replaces it freely. After graph.ontology.freeze, the ontology is immutable and this command fails with failed_precondition.engine.graph_ontology_frozen.

Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.

Examples

Define an object (node) type.

CLI

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

Wire

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

Parameters

NameTypeRequiredDescription
graphstringyesGraph name.
namestringyesObject type name.
propertiesobjectnoDeclared properties by name.

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

Returns

MutationAck<GraphOntologyWrite>.

Errors

Invocation

  • CLI: strata graph ontology define-object-type
  • Wire type: graph_define_object_type

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