In the result I get only one link for each point

Good afternoon, as a result of the execution of this query "MATCH (n: clients) - [r * 1..4] - (m) WHERE ID (n) = 73487 RETURN m, n, r LIMIT 1000" I get an array of 30 elements . In the neo4j browser, I get a normal graph, and the response to the code tab contains arrays for r. When using the connection through the driver, I get only one link in response. What could be the problem?

Решил проблему подключением через протокол bolt

1 Like

Although it's odd but it seems that the bolt driver returns a Path instance for the r
Instead of a collection of relationships. Not sure why.

https://neo4j.com/docs/api/javascript-driver/current/class/src/v1/graph-types.js~Path.html

As the syntax you use is deprecated it's probably better to use

MATCH path = (n: clients) - [* 1..4] - (m) 
WHERE ID (n) = 73487 
RETURN m, n, path LIMIT 1000