Creates an empty named graph in the selected space and returns its metadata, including node and edge counts (zero at creation) and the create commit coordinates. A database can hold many graphs; graph names are unique per branch and space. Creating a name that already exists fails with already_exists.engine.graph.
Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.
Examples
Create a named graph.
CLI
$ strata graph create social
$ strata graph list
Wire
{"graph":"social","type":"graph_create"}
{"type":"graph_list"}
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<GraphInfoData>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.graph_namealready_exists.engine.graphinvalid_argument.engine.graph_name_reserved
Invocation
- CLI:
strata graph create - Wire type:
graph_create