neo4j / neo4j-browser

Neo4j Browser is the general purpose user interface for working with Neo4j. Query, visualize, administrate and monitor the database.
https://neo4j.com
GNU General Public License v3.0
678 stars 346 forks source link

How is neo4j Connect result nodes implemented? #1909

Closed ZshaoChuan closed 1 year ago

ZshaoChuan commented 1 year ago

When this option is checked, the browser will display all the relationships of the nodes, While this works in the Neo4j browser, I cant quite get it to connect in Neo4j bloom. So question is whats the second query thats run to connect the result nodes under the hood? I wonder how this is achieved. Thank you so much.

OskarDamkjaer commented 1 year ago

The cyphe query we run is approximately:

MATCH (a)-[r]->(b) WHERE id(a) IN $existingNodeIds AND id(b) IN $existingNodeIds RETURN r;

With the $existingNodeIds parameter set to a list of all current ids (something like [1,2,3,4]).

This is where it's done in the code.

ZshaoChuan commented 1 year ago

Thank you very much for your answer!