I have a search query for a property which can be achieved by the following cypher query
MATCH (n: USER) WHERE n.fullname CONTAINS 'q' RETURN n
Say it matches 3 USER nodes and returns those 3
Then I want to see if there is a relationship with those nodes which is achieved by the following query which is handled by a for loop in python
MATCH (n: USER{userid: 'U1'})-[r:FOLLOWING]->(m:USER{userid: 'RESULT_USERID'}) RETURN m
(Executed 3 times for 3 results)
I want to do both of this in single query. How can it be achieved?
Thanks,
Skanda