edges

Generic Description

Inspects a path value returned by a Cypher path pattern or path function. It is documented separately because path-valued results carry ordered topology that is different from a flat row of nodes or relationships.

Simple example:

MATCH p = (:Page)-[:LINK]->(:Page) RETURN nodes(p), edges(p)

Consumer-Level Explanation

Use it when the path object needs to be decomposed into nodes, relationships, or structural quality checks. Prefer this function when the query needs to inspect path structure after matching, ranking, or filtering candidate traversals.

More Detailed Explanation

edges should be understood by the value shape it expects and the row shape it returns. It composes with MATCH, WHERE, WITH, RETURN, and procedure output, so planner-facing documentation should describe both the immediate value transformation and why it belongs in the database query.

Advanced Example

This example uses edges inside a named row pipeline so the value shape is clear to both the planner and reviewers.

MATCH p = (:Page)-[:LINK*1..2]->(:Page)
RETURN edges(p) AS focused_value, size(edges(p)) AS relationship_count
LIMIT 10

Real Use Cases

Real Limitations And Tradeoffs