cancel
Showing results for 
Search instead for 
Did you mean: 

How to get rid of unselected relationship in graph

vishalcjha
Node

I have simple query to generate graph 

CREATE (n1:TNode {id: 1}),
(n2:TNode {id:2})
MERGE (n1)-[:CONNECTED {id: 1}]->(n2)
MERGE (n1)-[:CONNECTED {id: 2}]->(n2)

And then I retrieve using 

MATCH (n1:TNode)-[r:CONNECTED {id : 1}]->(n2:TNode)
return n1, n2, r

Even though only one relationship is selected (also right pane says it) and in Table view I see only relationship, why graph displays two relationships. Two relationships are a.` id : 1` and b. ` id :2`.

Screen Shot 2022-07-26 at 9.37.54 PM.png Is there any way to display just one CONNECTED relationship?

1 ACCEPTED SOLUTION

glilienfield
Ninja
Ninja

The browser by default shows all all connections between nodes. You can disable this behavior so it shows only patterns from your query. Click on the settings icon (gear) on the bottom left.  Look for a checkbox at the bottom of the settings that references showing connections. Rerun the query after you turn it off. 

View solution in original post

2 REPLIES 2

glilienfield
Ninja
Ninja

The browser by default shows all all connections between nodes. You can disable this behavior so it shows only patterns from your query. Click on the settings icon (gear) on the bottom left.  Look for a checkbox at the bottom of the settings that references showing connections. Rerun the query after you turn it off. 

vishalcjha
Node

thanks for the quick response. It worked 👍