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.

Return all paths from one node to another node

Was wondering how to do this in Cypher.

In a commutative diagram these paths represent equal morphisms.

This method is deprecated:

MATCH p=(a{LaTeX:"A"})-[r*]->(b{LaTeX:"C"}) RETURN p

1 ACCEPTED SOLUTION

MATCH paths = (n1)-[*]-(n2)
RETURN paths SKIP x LIMIT 1

Replace x by 0, 1, 2, 3 for each path (query) you want to see on neo4j desktop.

OR

MATCH paths = (n1)-[*]-(n2)
RETURN paths

Will return all your paths in the Table tab view.
But you will still see all your graph in the Graph tab view

View solution in original post

2 REPLIES 2

MATCH paths = (n1)-[*]-(n2)
RETURN paths SKIP x LIMIT 1

Replace x by 0, 1, 2, 3 for each path (query) you want to see on neo4j desktop.

OR

MATCH paths = (n1)-[*]-(n2)
RETURN paths

Will return all your paths in the Table tab view.
But you will still see all your graph in the Graph tab view

You, son, are a gifted genius, thank you!