Reputation: 886
I want to use Cypher to get a list of all the relationships (incoming and outgoing) of a node.
For example, here we have 4 nodes and their associated relationships. I want to list all the relationships associated with the APT28
node.
Upvotes: 2
Views: 645
Reputation: 66989
You don't provide enough information about your data model. So I will assume here that the node you are interested in has the label Foo
and that the APT28
value is in the id
property.
To get all of the APT28
node's outgoing and incoming relationships, simply use this query (notice that it uses an undirected relationship pattern):
MATCH (n:Foo {id: 'APT28'})-[r]-()
RETURN r
Upvotes: 1