cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Py2neo graph traversals

I have created a graph database. How can I perform graph traversals using py2neo? Can I apply traversal algorithms such as BFS and DFS in py2neo?
Also how can I write a cypher query which gives all the relationships and nodes existing between two nodes when two nodes are given as input. ex: a-r1>b-r2>c-r3>d...and if I give a and d as input nodes, I want the output as set of relations: r1,r2,r3 and set of nodes: b,c..
How can I write a cypher query for this?

1 REPLY 1

You can do such traversals with the apoc.expand procedures which have fine control over traversal modes.

I guess you already looked at the Cypher syntax and took the online training?

That should help you with figuring out the query which is a simple match + return of your pattern.