Cypher query - check connection, if not, check another
I would like to check if a relationship exists from a node, and in case it is not found, then I want to check a different type of relationship with the same node.
Something like (a: Type) - [: relation1] - (b) if relation1 exists the query returns node b . If does not exist , then another relation of type (a: Type) - [: relation2] - (b) will be checked and returns node b .
I want to know how this can be written as a single cypher request. Any help would be greatly appreciated. Thank.
+3
source to share
2 answers