An undirected graph connects node pairs symmetrically: the relationship has no meaningful direction, so traversal works from either endpoint. Friendship is a typical example because mutual connection is implied. In a labeled-property graph, the relationship can still have a type and properties such as a friendship date. section 2.1.1 section 2.2.1
Represent and query an undirected relationship in practical graph workflows:
- Write a Cypher relationship without a direction marker, such as (:Person)-[:FRIEND {since: 2016}]-(:Person). section 2.2
- When the database stores only directed links, represent one undirected connection with two opposite directed relationships. section 2.1.1 section 7.2
- Ignore relationship direction during Cypher traversal when direction adds no semantic value, avoiding unnecessary duplicate storage where appropriate. section 2.5 section 2.2.1
- Account for undirected semantics in algorithm calculations; for example, potential neighbor connections are halved when computing a clustering coefficient. section 10.3.5
Friendship and hashtag co-occurrence
A friendship between Thomas and Elaine can be modeled as a single FRIEND connection whose direction is ignored during traversal. Likewise, if #NLP co-occurs with #AI, the co-occurrence is mutual; a weighted undirected network can record the count of shared appearances. In GDS, that connection is represented as two opposite directed relationships. section 2.2 section 7.2
Compare the visual difference between directed relationships and an undirected connection. section 2.1.1




