I'm creating some removal queries for vertices and edges in ArangoDB using AQL and I assumed there would be a "safe" way to delete vertices that would also remove associated edges. But I can't find any in the documentation or anywhere else. Is the following the best way to do a safe delete?
FOR e IN GRAPH_EDGES('EdgeClass',docId,{direction:'any',maxDepth:1, includeData:false})
REMOVE e._key FROM EdgeClass
combined with
REMOVE docKey IN DocumentClass
Also, is there a way to remove vertices (or edges) using _id
s or is it necessary to use _key
s? I couldn't get the former to work.