New workspace query visualizer doesn't show edges
complete
neo4j-shared@volleythat.com
In the old version of Neo4j Browser, when I return a query that includes relationships between nodes, those are visible in the graph. In the new workspace version, I just see nodes. I can click on a node and then the graph icon to see it's relationships, but I just want to see the relationships without having to click twice on every node.
I used to be able to do a simple
match (n) return n
query to show all my nodes and relationships. Now it just shows the nodes. Is there a way to get this behavior back?Gregory King
complete
Gregory King
Hey,
You are correct, this was the default behaviour of Neo4j Browser. It had a somewhat hidden setting called "connect result nodes" (enabled by default), which connected any nodes returned with relationships that existed between them.
In Workspace Query, if you return nodes and connecting relationships explicitly, for example
MATCH (n)-[r]->(p) RETURN n, r, p LIMIT 5
or
MATCH (n)-[r]->(p) RETURN * LIMIT 5
or return a path
MATCH pth=()-[]->() RETURN pth LIMIT 5
you will see the nodes and their relationships.
Browser and Query are about querying, and those queries offer precise control over what is and isn't returned. In Browser we found it often caused confusion when writing queries that explicitly returned specific relationships, but the "connect result nodes" setting added 'bonus' relationships that weren't explicitly returned by the query. Users were left confused as to why additional relationships were returned in the graph visualisation. For this reason, for now we've elected not to replicate the connect result nodes option with a view it will make things clearer for the majority of uses.
Hopefully that makes sense and I'd love to hear more of your thoughts on it. We are working on improving the visualisation so this could be something we look at addressing in future by providing a visualisation level setting that allows result nodes to be connected on an opt-in basis, closer to where the setting takes effect.
Thanks for your feedback!
Greg
neo4j-shared@volleythat.com
Gregory King:
Ok thanks for letting me know. I really like having a simple query that can return everything so I can get a sense of what is going on in the whole graph at a glance. This works with the new settings (also returns nodes without any relationships):
match p=()-[]-()
match (n)
return n, p