Skip to main content

DROP

Drops elements from your database. The DROP effects the elements returned by the traversal.
You can use the drop on any traversal that returns a list of elements. DROP will do nothing if the result of the expression is not a list of elements or if the list is empty.

Example 1: Removing a user node by ID

Dropping a node will also remove all related edges that are connected to it.
Heres how to run the query using the SDKs or curl

Example 2: Removing outgoing neighbors

Use DROP on the outgoing traversal to delete connected neighbor nodes and the connecting edges.
Heres how to run the query using the SDKs or curl

Example 3: Removing incoming neighbors

Delete any users that follow the target user by traversing incoming connections.
Heres how to run the query using the SDKs or curl

Example 4: Removing outgoing edges only

Strip all follows edges that originate from the user without touching the neighbor nodes.
Heres how to run the query using the SDKs or curl

Example 5: Removing incoming edges only

Target follows edges pointing at the user while leaving the neighbor nodes untouched.
Heres how to run the query using the SDKs or curl
Currently, Helix does not support deleting vectors from the graph. As a workaround, you can delete the node and/or the edge that the vector is attached to.