I look for the cypher code enable to return only one path.
I assume that I have, A->B1->C1->D1->B1 and A->B2->C2->D2->B2.
I would to retrieve the components of these 2 cycles.
I try the following code but I retrieve 6 cycles
WHERE all(r in relationships(path))
RETURN relationships(path) as rel
path1 : B1->C1->D1
path2 : C1->D1->B1
path3 : D1->B1->C1
path4 : B2->C2->D2
path5 : C2->D2->B2
path6 : D2->B2->C2
How can I update the code to retrieve only path1 and path4 following an order based on id of node ?