Applies an explicit policy to every graph node bound to the given entity target: cascade deletes the bound nodes and their incident edges, detach keeps the nodes but removes their bindings, and keep_dangling preserves the bindings so traversal can report the target’s status. The acknowledgement reports how many bound nodes the policy covered.
Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.
Examples
Cascade-delete graph facts bound to an entity.
CLI
$ strata graph create kb
$ strata graph add-node kb ada --binding {"target":{"key":"user:1","primitive":"kv","space":"default"}}
$ strata command run --command-json '{"policy":"cascade","target":{"key":"user:1","primitive":"kv","space":"default"},"type":"graph_apply_delete_policy"}' # cascade removes the bound node and its incident edges.
$ strata graph get-node kb ada
Wire
{"graph":"kb","type":"graph_create"}
{"binding":{"target":{"key":"user:1","primitive":"kv","space":"default"}},"graph":"kb","node_id":"ada","type":"graph_add_node"}
{"policy":"cascade","target":{"key":"user:1","primitive":"kv","space":"default"},"type":"graph_apply_delete_policy"}
{"graph":"kb","node_id":"ada","type":"graph_get_node"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
policy | GraphDeletePolicy | yes | Policy to apply: cascade, detach, or keep_dangling. |
target | GraphBindingTarget | yes | The bound entity target. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
MutationAck<GraphDeletePolicyApply>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.graph_binding
Invocation
- CLI: via
strata command run(no dedicated verb) - Wire type:
graph_apply_delete_policy