12.1. Path Expander Overview

This section describes procedures that can be used to do variable length path traversals.

The Cypher query language supports variable-length pattern matching, but path expansion is limited to relationship types. The path expander procedures enable more powerful variable length path traversals, where users can specify the following:

This functionality is supported by five procedures:

Procedure Description Documentation


expands paths using Cypher’s default expansion modes (bfs and 'RELATIONSHIP_PATH' uniqueness).

Section 12.2, “Expand paths”


expands paths with more flexible configuration of parameters and expansion modes.

Section 12.3, “Expand paths with config”


expands to nodes of a subgraph.

Section 12.4, “Expand to nodes in a subgraph”


expands to nodes of a subgraph and also returns all relationships in the subgraph.

Section 12.5, “Expand to subgraph”


expands to paths collectively forming a spanning tree.

Section 12.6, “Expand a spanning tree”