I am trying to traverse the graph and follow the direction for one kind of relationships.
Example. I have relationships of type A,B,C,D and nodes. For relationships of type A i want only to retrieve those who points at my start node, or are incoming to other nodes in my query. So if i have 3rd node from n0 i want to retrieve the patsh with incoming relationship of type A to 3rd node.
This is my start query.
MATCH p=(n0 {id:1})<-[*0..4]-(n)
I have tried several approaches without luck. I either get only those who are one hop away or all but for all directions of A.
This is an example path i want
(n0)<-[:B]-(n1)<-[:C]-(n2)<-[:B]-(n3)<-[:A]-(n4)
(n0)<-[:A]-(n1)<-[:C]-(n2)<-[:B]-(n3)<-[:A]-(n4)
This is an example path i DO not want
(n0)<-[:B]-(n1)<-[:C]-(n2)<-[:B]-(n3)**-[:A]->**(n4)
(n0)**-[:A]->**(n1)<-[:C]-(n2)<-[:B]-(n3)<-[:A]-(n4)