I have a Neo4j graph that looks something like this : (person:Person)-[:acted_in]->(movie:Movie)-[:played_in]->(country:Country)
I would like to match the whole path using this query:
MATCH path = ((person:Person)-[:acted_in]->(movie:Movie)-[:played_in]->(country:Country)) RETURN NODES(path), RELATIONSHIPS(path)
but, here is the tricky part, I would also like to add a condition that if [:played_in] does not exist, just return the partial path: (person:Person)-[:acted_in]->(movie:Movie)
Thanks.