cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Querying one relationship between two nodes with multiple relationships

Hey there,

I have two nodes, User, and System. These nodes have 3 types of relationships. Has_access, is_stakeholder, is_admin

My Cypher query wants all to show all users who have a stakeholder relationship to a system. My query is 

 

 

MATCH n =(user:User)-[r:IS_STAKEHOLDER_OF]->(system:System)
RETURN n

 

 

When I run this in neo4j Browser, I get nodes that are displaying all three relationships instead of only Is_stakeholder

AnthonySchanen_0-1654185590906.png

Weirdly, this does not occur in NeoDash, another front end for visualization, here is the graph produced by the same cypher query there

AnthonySchanen_1-1654185672584.png

 

No changes to the data have been made. What is the difference that is causing this?

1 ACCEPTED SOLUTION

andy_hegedus
Graph Fellow

I think what may be happening is in the path is being returned and all available relationships between the returned nodes are show. In settings there is an option for "connect result nodes". Disabling it will show only the specifically queried relationships.

Andy

View solution in original post

1 REPLY 1

andy_hegedus
Graph Fellow

I think what may be happening is in the path is being returned and all available relationships between the returned nodes are show. In settings there is an option for "connect result nodes". Disabling it will show only the specifically queried relationships.

Andy