If I do:

```
MATCH (x:NODE {x.name: "Node1"})-[r:REL1]-(y:NODE) return x,r,y

```

How do I then find all the `REL1` relationships amongst the set of `x` and `y` nodes?

EDIT:

Based on the answers I think the question wasn't clear.

Example graph:

```
create (:T1 {name:1}), (:T1 {name:2}), (:T1 {name:3}), (:T1 {name:4}), (:T1 {name:5}), (:T1 {name:6}), (:T1 {name:7})
match (a:T1 {name:1}), (b:T1 {name:2}) create (a)-[r:REL1]->(b)
match (a:T1 {name:1}), (b:T1 {name:3}) create (a)-[r:REL1]->(b)
match (a:T1 {name:5}), (b:T1 {name:4}) create (a)-[r:REL1]->(b)
match (a:T1 {name:5}), (b:T1 {name:3}) create (a)-[r:REL1]->(b)
match (a:T1 {name:5}), (b:T1 {name:2}) create (a)-[r:REL1]->(b)
match (a:T1 {name:5}), (b:T1 {name:1}) create (a)-[r:REL1]->(b)
match (a:T1 {name:7}), (b:T1 {name:6}) create (a)-[r:REL2]->(b)
match (a:T1 {name:7}), (b:T1 {name:5}) create (a)-[r:REL2]->(b)
match (a:T1 {name:7}), (b:T1 {name:4}) create (a)-[r:REL2]->(b)
match (a:T1 {name:7}), (b:T1 {name:3}) create (a)-[r:REL2]->(b)

```

I'm going to find everything that has a `REL1` relationship with node `name:5`. I want to also find all the `REL1` relationships amongst the returned nodes.

So I should get

```
5->4
5->3
5->2
5->1
1->2
1->3

```

But not 

```
7->5
7->4
7->3

```

Because those are `REL2` relationships.

So I think I can do it like this:

```
match (a:T1 {name: 5})-[b:REL1]->(c:T1) return a,b,c
union match (a:T1)-[b:REL1]-(c:T1) return a,b,c

```

But the problem is that the graph I'm working with is really large, so this seems quite inefficient. I'd prefer to be able to 

1. Select a set of nodes (everything connected to `5`)
2. Find all the connections amongst those nodes