Removes one directed edge by its (src, edge_type, dst) triple. The endpoints are untouched. Removing an edge that does not exist is not an error: the acknowledgement reports deleted: false.
Successful mutations return an acknowledgement that identifies the affected target, the mutation effect, and commit facts when the operation changed stored state.
Examples
Remove an edge.
CLI
$ strata graph create social
$ strata graph add-node social alice
$ strata graph add-node social bob
$ strata graph add-edge social alice knows bob
$ strata graph remove-edge social alice knows bob
$ strata graph get-edge social alice knows bob
Wire
{"graph":"social","type":"graph_create"}
{"graph":"social","node_id":"alice","type":"graph_add_node"}
{"graph":"social","node_id":"bob","type":"graph_add_node"}
{"dst":"bob","edge_type":"knows","graph":"social","src":"alice","type":"graph_add_edge"}
{"dst":"bob","edge_type":"knows","graph":"social","src":"alice","type":"graph_remove_edge"}
{"dst":"bob","edge_type":"knows","graph":"social","src":"alice","type":"graph_get_edge"}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
dst | string | yes | Destination node id. |
edge_type | string | yes | Edge type. |
graph | string | yes | Graph name. |
src | string | yes | Source node id. |
Plus the optional scope: branch and space (default to the session branch and the "default" space).
Returns
MutationAck<GraphDelete>.
Errors
failed_precondition.engine.runtime_closednot_found.engine.branchinvalid_argument.engine.product_spaceinvalid_argument.engine.graph_namenot_found.engine.graphinvalid_argument.engine.graph_node_idinvalid_argument.engine.graph_edge_type
Invocation
- CLI:
strata graph remove-edge - Wire type:
graph_remove_edge