GQL data types

Graph Query Language (GQL) supports all GoogleSQL data types, including the following GQL-specific data type:

Graph data types list

Name Summary
Graph element type An element in a property graph.
SQL type name: GRAPH_ELEMENT

Graph element type

Name Description
GRAPH_ELEMENT An element in a property graph.

A variable with a GRAPH_ELEMENT type is produced by a graph query. The generated type has this format:

GRAPH_ELEMENT<T>

A graph element can be one of two kinds: a node or edge. A graph element is similar to the struct type, except that fields are graph properties, and you can only access graph properties by name. A graph element can represent nodes or edges from multiple node or edge tables if multiple such tables match the given label expression.

Example

In the following example, n represents a graph element in the FinGraph property graph:

GRAPH FinGraph
MATCH (n:Person)
RETURN n.name