I have a large scale graph database with hundreds of nodes and relationships. its look like a tree. i want to write a query to get returned just only a branch. i have attached a simple graphical representation of what i needed for more information....
here i want to start traverse from node A then A->B->C that is a one branch, then again start from A->B-->D that is another branch. finally i want to merge those two branch and get a output as shown in the right side. there can be more than two output to merge it depends on my original graph. this is a example. different color arrows shows different types of relationships.
patterns that i needed to check are:
(A)<-[:ORANGE]-p->[:RED]-q ;where p & p can be any nodes node A is known (A)<-[:ORANGE]-r->[:GREEN]-s ;where r & s can be any nodes node A is known
![figure][1]