Validates the draft ontology and freezes it. Validation requires at least one declared type and rejects link types whose source or target reference undeclared object types (failed_precondition.engine.graph_ontology_freeze). After freezing, writes enforce declared node object types, required properties, and link-type endpoint rules; the ontology itself can no longer change (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
Freeze the ontology so its types can no longer change.
CLI
$ strata graph create g
$ strata graph ontology define-object-type g person
$ strata graph ontology freeze g
$ strata graph ontology get g
Wire
{"graph":"g","type":"graph_create"}
{"graph":"g","name":"person","type":"graph_define_object_type"}
{"graph":"g","type":"graph_freeze_ontology"}
{"graph":"g","type":"graph_get_ontology"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
graph | string | yes | Graph name. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
MutationAck<GraphOntologyFreeze>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.graph_namenot_found.engine.graphfailed_precondition.engine.graph_ontology_freezefailed_precondition.engine.graph_ontology_frozen
Invocation
- CLI:
strata graph ontology freeze - Wire type:
graph_freeze_ontology