I have a graph which has a set of nodes and its children. There is a root node from where the rest of the nodes branch out. There are few sets of such node collection.
I want to pick a root node and clear all its connections and nodes recursively, leaving the root node for future additions.
start n=node:DataSpace(DataSpaceName="DS1") match (ds)-[r]-(e) delete e,r
The above Query is definitely wrong, as it does not consider recursion and also the condition that entities have to be deleted before deleting the relations.
Any suggestions on how to achieve the same.
Also, since I will be using neo4JClient, it will be great if we have a neo4jClient translation as well.