Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
01-05-2022 04:02 AM
In Match with hops query[Follows*1..3], what query can give me the degrees of separation in the response?
I am working on a force-graph in react with a node/express api. I would like to see the actual degree of separation, 1st level, second level, etc.
01-05-2022 05:34 AM
01-05-2022 03:32 PM
As Cobra mentioned, length(path)
is what you're looking for, but this requires that you add a path variable into your MATCH. Something like:
MATCH path = (user1:User {id:12345})-[Follows*1..3]-(user2)
WITH user1, user2, length(path) as pathLength
...
All the sessions of the conference are now available online