Alekhya Vemavarapu
Alekhya Vemavarapu

Reputation: 1155

NEO4J - Retrieve uni directional relationship between nodes

Imagine I have 2 nodes A & B where relation from

A -> B is x

and relation from

B -> A is y

Is there a way where I can get just the outgoing relations from A ?

Like I need a CQL when asked for A -> B , gives me only x

EDIT:

I'm looking for a query which gives me relation from A -> B (only), not from B-> A

Thanks for your time.

Upvotes: 0

Views: 27

Answers (1)

Supamiu
Supamiu

Reputation: 8731

You can simply do this to match all outgoing relations from A:

Match (A:yourLabel{yourProperty: theValue})-[r]->(B) return r

This will return all the outgoint relations from A.

Upvotes: 1

Related Questions