Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Neo4j Cypher query to show entire graph, including relationship properties?

Tags:

neo4j

cypher

I'm building a Neo4J system just do to visualization in the Neo4J browser. I build the various nodes and relationships and I can visualize the database by running match (n) return n. The problem is that the resulting display shows the relationship names but not their associated properties. Can anyone tell me the cypher query to show the entire database including relationship properties? Thanks.

like image 931
Brian Tarbox Avatar asked Sep 17 '25 17:09

Brian Tarbox


1 Answers

The neo4j browser does not support visualizing all properties (for nodes or relationships) at the same time. Such a capability would generally result in a very congested and unusable visualization, especially since the browser would also have to display the property names.

You can, however, opt to show the value of a single property per node label or or relationship type as its caption. You can do that manually, or you can edit the GRASS file to set all of the captions at once. As an example of how to set relationship captions in the GRASS file, the following entry in that file would specify that all BAR relationships should show their foo property:

relationship.BAR {
  caption: '{foo}';
}
like image 54
cybersam Avatar answered Sep 21 '25 02:09

cybersam