Drops elements from your database. The DROP effects the elements returned by the traversal.
Copy
Ask AI
DROP <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.
QUERY DeleteUser(userID: ID) => // Drop all the Out nodes and edges of the user DROP N<User>(userID)::Out<Follows> // Drop all the In nodes and edges of the user DROP N<User>(userID)::In<Follows> // Drop all the Out edges of the user DROP N<User>(userID)::OutE<Follows> // Drop all the In edges of the user DROP N<User>(userID)::InE<Follows> // Drop the user's node DROP N<User>(userID) RETURN "Success"
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.