graph

node.add

Add or replace a graph node.

strata graph add-node

wire graph_add_node

Adds a node to a graph or replaces it if the node id already exists. A node carries optional JSON properties, an optional declared object type (validated once the graph's ontology is frozen), and an optional entity binding that links the node to a row in another primitive. Cross-branch bindings are rejected.

Successful mutations return an acknowledgement of the outcome: for a state-changing write, the affected target with the mutation effect and commit facts; for mutations that produce a domain result (such as a branch or a promotion outcome), that result object.

To see the complete help for this command, run:

strata graph add-node --help

Example

Add a node with an object type and properties.

strata graph create socialstrata graph add-node social alice --type person --properties {"age":30}strata graph get-node social alice

Parameters

NameTypeRequiredDescription
graphstringyesGraph name.
node_idstringyesNode id.
bindinganynoOptional entity binding.
branchstring or nullnoTarget branch. Defaults to the executor handle branch.
object_typestring or nullnoOptional declared object type (validated once the ontology is frozen).
propertiesanynoOptional node properties.
spacestring or nullnoTarget product space. Defaults to `"default"`.

Returns

MutationAck<GraphNodeWrite>

  • dataobject
  • typestring

Errors

Recover by code. Retry policy and commit outcome come from the shipped error registry.

← All 31 Graph commands

agents: this page as markdown → /docs/reference/graph/node/add.md