I want to create relationship between nodes and relationship label should be assigned from a variable value. I am using GraphDatabase module from neo4j plugin for python for connecting to neo4j.
def create_relationships(tx): result = tx.run("MATCH (a:NodeType1), (b:NodeType2)" "MERGE (a)-[r:$related]->(b)" "RETURN r", related = getLabelForRelationship()) return result
Basically for any relation creation (a)-[:related]-(b), related string is not fixed so instead of string related I want to use a variable. Is this possible? Can someone please help me with this?