neo4jcypherrelationshipbidirectional-relation

Neo4j Bidirectional Relationship


Is there a way to create bidirectional relationship in Neo4j using Cypher? I would like the relationship to be bidirectional rather than making two unidirectional relationships in both directions For eg:

(A)<-[FRIEND]->(B)

Rather than:

(A)-[FRIEND]->(B)
(A)<-[FRIEND]-(B)

Thanks in advance :)


Solution

  • No, there isn't. All relationships in neo4j have a direction, starting and ending at a given node.

    There are a small number of workarounds.