I want to return all nodes/relationships until I find the first node that has a certain relationship in an arbitrary number of iterations.
Example
Given:
X(1)-[foo]->X(2)-[foo]->X(3)-[bar]->X(4)-[foo]->X(5)
I want this returned:
X(1)-[foo]->X(2)-[fo...