Suppose I have graph dependencies defined as A-> B, A-> D, C-> A, B-> C, B-> D. I need to get the following subgraph in Neo4j -
- Get all connections of the 1st degree (independent or outdated) node, i.e. for node A it will be B, C, D
- Get all the faces between these 1st degree nodes. Since B, C, D are 1st degree compounds, the edges are B-> C, B-> D
For the first part, I have the following query -
MATCH (s:Node)->(d:Node)
WHERE s.name = 'A' OR d.name = 'A'
I cannot get the second part of the data in the same query. Do I need to sort through all the nodes?
source
share