Skip to Content

Edge data type

An edge (also known as a relationship) is a fundamental data type in Cypher that represents a connection or relationship between two vertices in a graph database. Each edge has:

  • A src id and dst id identifier(of BIGINT type) that identifies the source and target vertices.
  • A label of VARCHAR type that describes the type of relationship
  • A set of properties that store its attributes

Edge operations

Accessing edge properties

You can access edge properties using dot notation:

-- Return specific edge properties MATCH (a)-[r:KNOWS]->(b) RETURN r.since; -- Return the entire edge MATCH (a)-[r:KNOWS]->(b) RETURN r;

Accessing edge src/dst id and label

Use edge functions to access edge src/dst id and label.

Last updated on