What is correct way of finding path between 2 nodes without getting warnings in neo4j?

Viewed 3289

I am currently working with neo4j and I need to find path between 2 nodes in large graph. I am using this cypher query:

MATCH p=(acq:Acquisition {id:'1'})-[r*]->(ecs:ExternalCommunicationService {id:'1'})
RETURN p

Everything works as expected (query returns path of any length between nodes) but I am getting warning message displayed bellow:

Warning: This feature is deprecated and will be removed in future versions. Binding relationships to a list in a variable length pattern is deprecated.

In official documentation is used same pattern with *.

What is the correct way of finding paths of any lengths between nodes without getting any warning(without using deprecated syntax) ?

2 Answers
Related