## 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:

- the direction of the relationship per relationship type.
- a list of label names which act as a "whitelist" or a "blacklist".
- end nodes for the expansion.

This functionality is supported by five procedures:

Procedure | Description | Documentation
--- | --- | ---
`apoc.path.expand()` | expands paths using Cypher’s default expansion modes (bfs and 'RELATIONSHIP_PATH' uniqueness). | Section 12.2, “Expand paths”
`apoc.path.expandConfig()` | expands paths with more flexible configuration of parameters and expansion modes. | Section 12.3, “Expand paths with config”
`apoc.path.subgraphNodes()` | expands to nodes of a subgraph. | Section 12.4, “Expand to nodes in a subgraph”
`apoc.path.subgraphAll()` | expands to nodes of a subgraph and also returns all relationships in the subgraph. | Section 12.5, “Expand to subgraph”
`apoc.path.spanningTree()` | expands to paths collectively forming a spanning tree. | Section 12.6, “Expand a spanning tree”