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.

New in Neo4j Database

How to write a query to traverse a path (node 1 to node n)

1 REPLY 1

Hi chetanjadhav3288,

welcome the Neo4j community!

I think you need to be more specific with your question for us to really help you. But maybe as a start:

There are several path finding algorithms that you can use: https://neo4j.com/docs/graph-data-science/current/algorithms/pathfinding/

But you can also look for it (less efficiently) without using algorithms by e.g.:
MATCH path = (a:Node {id: 1})-[:RELATIONSHIP_TYPE*]->(b:Node {id: 20}) RETURN path

Regards,
Elena