Cypher dynamic relationship with conditional APOC procedure?
问题 I am learning cypher and trying to find out a way to create dynamic relationship when a condition passes. Here is an example: we have single node: (n2) and another node which has unknown relationship of TEMP_1 or TEMP_2 with its child: (n1)------[TEMP_1 or TEMP_2]------>(child) we want to create relationship between (n2) and (child) if it exists (n2)------[TEMP_1 or TEMP_2]------>(child) Here is query: MATCH (n1: NODE_1) MATCH (n2: NODE_2) OPTIONAL MATCH (n1)-[rel:TEMP_1|TEMP_2]->(child) CALL