Graph patterns
The graph pattern describes a particular structure of nodes and edges, and their labels and properties. The graph pattern is mainly used for retrieving nodes, edges, paths, and subgraphs within a graph that conforms to it.

Figure 2.9: A MATCH statement with patterns
This example shows a path pattern composed of two node patterns and one edge pattern: (a)
and (b)
are node patterns to match the nodes and -[:Follows]->
is an edge pattern to match the edges in the paths.
The details of patterns will be discussed in later chapters of this book.
Element patterns
Element patterns are the basic components of a graph pattern and consist of node patterns and edge patterns:
- A node pattern specifies a node to be matched in the graph and is syntactically represented by a pair of parentheses
- An edge pattern specifies an edge to be matched and can be expressed either as a full edge pattern or as an abbreviated form, depending on the inclusion...