# Excluded Relations being displayed in the Graph UI, but missing in Response

**URL:** https://community.neo4j.com/t/excluded-relations-being-displayed-in-the-graph-ui-but-missing-in-response/48304
**Category:** Neo4j Graph Platform
**Created:** [December 1, 2021, 11:35am UTC](https://community.neo4j.com/t/excluded-relations-being-displayed-in-the-graph-ui-but-missing-in-response/48304 "2021-12-01T11:35:22Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![nima](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/nima/32/4239_2.png) [@nima](https://community.neo4j.com/u/nima)
#### Post date: [December 1, 2021, 11:35am UTC](https://community.neo4j.com/t/excluded-relations-being-displayed-in-the-graph-ui-but-missing-in-response/48304/1 "2021-12-01T11:35:22Z")

</div>

# Sample Data:

CREATE (n:Node {node\_id : 'node-1'});  
CREATE (n:Node {node\_id : 'node-2'});  
CREATE (n:Node {node\_id : 'node-3'});

MATCH (s:Node {node\_id: 'node-1'}), (d:Node {node\_id: 'node-2'}) CREATE (s)-[:HAS\_RELATION {relation\_id: 'r1'}]-\>(d);  
MATCH (s:Node {node\_id: 'node-1'}), (d:Node {node\_id: 'node-2'}) CREATE (s)-[:HAS\_RELATION {relation\_id: 'r2'}]-\>(d);

MATCH (s:Node {node\_id: 'node-2'}), (d:Node {node\_id: 'node-3'}) CREATE (s)-[:HAS\_RELATION {relation\_id: 'r1'}]-\>(d);  
MATCH (s:Node {node\_id: 'node-2'}), (d:Node {node\_id: 'node-3'}) CREATE (s)-[:HAS\_RELATION {relation\_id: 'r2'}]-\>(d);

 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/a/6/a645ccdff7667e23cb98f61d72af58bbab8630b8.png)

# Goal

Searching for all the paths with relation\_id: `r1` (we're not interested in any other relations in the returned path)

# Query

```auto
MATCH p=(s:Node)-[r:HAS_RELATION*1..10]->(d:Node)
WHERE s.node_id = "node-1" AND ALL (r IN relationships(p) WHERE r.relation_id = 'r1')
RETURN DISTINCT p

```

# Problem

 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/e/4/e485816e170da4407834c09baa7cc56924861f2c.png)  
Although the returned graph shows that it returns all paths, the result data only contains relations with relation\_id: r1.  
 ![image](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/9/b/9b2246ef6a9db2da85f811272e065dc9730531bd.png)

Is there any reason for this ? I mean since it might be misleading, is there any way to only show the returned paths in the result ?

Thanks

---

<div class="post-metadata">

### Author: ![giuseppe\_villan](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/giuseppe_villan/32/11871_2.png) [@giuseppe\_villan](https://community.neo4j.com/u/giuseppe_villan)
#### Post date: [December 1, 2021, 3:47pm UTC](https://community.neo4j.com/t/excluded-relations-being-displayed-in-the-graph-ui-but-missing-in-response/48304/2 "2021-12-01T15:47:56Z")

</div>

@nima

Yep, it's not so easy to found. You must go on "Browser settings" on left sidebar (the Gear icon), and deselect the checkbox "Connect result nodes" at the end of the panel.

 ![Schermata 2021-12-01 alle 16.43.13](https://us1.discourse-cdn.com/flex021/uploads/neo4jcommunity/original/3X/5/1/5121abb9d338154050f78da9ac0f945bb2849c39.jpeg)

---

<div class="post-metadata">

### Author: ![nima](https://sea1.discourse-cdn.com/flex021/user_avatar/community.neo4j.com/nima/32/4239_2.png) [@nima](https://community.neo4j.com/u/nima)
#### Post date: [December 1, 2021, 8:49pm UTC](https://community.neo4j.com/t/excluded-relations-being-displayed-in-the-graph-ui-but-missing-in-response/48304/3 "2021-12-01T20:49:23Z")

</div>

@giuseppe_villan Thanks for the help 🙂 imo, it should have been disabled by default, since it could be misleading (what you see is not the actual result)
