0
votes

I need to delete a node from a neo4j db but according to the docs all the node's relationships have to be deleted first, so guess I need to get the list of those relationships and then delete them one by one. node.getRelationships(type) returns relationships of a particular type -- but not all relationships of all types. Passing '*' for the type doesn't work.

Is there a simpler way to delete a node, or get a list of relationships?

It looks fairly easy to do this directly in cypher so I can always fall back on that, but I'd like to use the node-neo4j library if possible.

Thanks, Alex

1

1 Answers

0
votes

Can you pass node.delete(force=true) for the node? Otherwise, you can call the node.all() function to get all the relationships.

Sorry if the syntax looks wrong, JS/CS is not my native language.