I'm a newbie and was playing with the example graph in apoc.nodes.cycles. I wanted to generate the same graph as shown using the apoc.nodes.cycles call (which is currently failing).
I know... I can do something like:
match (s:Start|Module)-[r]-(d:Start|Module) (since all the relationships start or end on a Start or Module node). No Joy!
So I tried the Cheat sheet:
MATCH (n:A|B)
RETURN n.name AS name
(with appropriate label changes). Still no Joy!
Eventually, I got what I wanted:
match (s1:Start)-[r1]-(s2:Start)
with s1,r1,s2
match (s3:Start)-[r2]-(m1:Module)
with s1,s2,s3,m1,r1,r2
match (m2:Module)-[r3]-(m3:Module)
return s1,s2,s3,m1,m2,m3,r1,r2,r3
Why is the cheat sheet version of alternatives not working? Is there any simpler syntax to achieve the desired result?
TIA,
Paolo
[Edit: I DID try replacing the Bar character with OR, to no avail]