I have a Neo4j graph as below. I can get the chains of nodes of type B with the following command. How can I obtain the nodes of type A, along with the B ones?
MATCH (from: B)-[relation:SAW*1..]->(to: B) RETURN from,to,relation
I have a Neo4j graph as below. I can get the chains of nodes of type B with the following command. How can I obtain the nodes of type A, along with the B ones?
MATCH (from: B)-[relation:SAW*1..]->(to: B) RETURN from,to,relation
MATCH (from)-[relation:SAW*1..]->(to)
WHERE (from:A OR from:B)
AND (to:A OR to:B)
RETURN from,to,relation