GQL conformance
Last updated: 24 October 2024
Neo4j version: 5.25
GQL is the new ISO International Standard query language for graph databases.
GQL has adopted much of Cypher®’s query construction semantics, such as adhering to the MATCH/RETURN
format.
Consequently, Cypher now accommodates most mandatory GQL features and a substantial portion of its optional ones (defined by the ISO/IEC 39075:2024(en) - Information technology - Database languages - GQL Standard).
Users should, therefore, only expect minimal differences between crafting queries in Cypher and GQL.
For example, the following query is valid in both languages:
MATCH (a:Actor)-[:ACTED_IN]->(m:Movie)
WHERE a.name = 'Tom Hanks'
RETURN m.title
Cypher supports the majority of mandatory GQL features. For a full list see Supported mandatory GQL features. There are, however, currently a few mandatory GQL features not yet in Cypher that Neo4j is actively working towards implementing. These are listed in the page Currently unsupported mandatory GQL features.
Neo4j is also working towards increasing its support of optional GQL features. These are listed in the page Supported optional GQL features.
Some optional GQL features not yet implemented in Cypher already have analogous Cypher equivalents. These features are listed in the page Optional GQL features and analogous Cypher.
Additionally, Cypher contains additional features that are not part of GQL and no GQL alternatives currently exist for them. These features are listed in the page Additional Cypher features.
Note on minimum GQL conformance
Following the GQL Standard subclause 24.2, Minimum conformance, Cypher’s support of the following mandatory GQL features is explicitly declared:
-
Graph with an open graph type (Feature GG01).
-
The Unicode Standard version used by Cypher depends on the running JVM version. Neo4j 5 added support for JavaSE 17 and version 13 of The Unicode Standard. Neo4j 5.14 added support for JavaSE 21 and version 15 of the Unicode Standard. For more information, see Parsing → Using Unicode in Cypher.
-
Cypher supports the following mandatory GQL property types:
BOOLEAN
(BOOL
),FLOAT
[1],INTEGER
(SIGNED INTEGER
, orINT
)[2], andSTRING
(VARCHAR
).Cypher also supports the following optional GQL property types:
DATE
,DURATION
,LIST<INNER_TYPE NOT NULL>
(ARRAY<INNER_TYPE NOT NULL>
,INNER_TYPE LIST
, orINNER_TYPE ARRAY
)[3],LOCAL DATETIME
(TIMESTAMP WITHOUT TIME ZONE
),LOCAL TIME
(TIME WITHOUT TIME ZONE
),POINT
,ZONED DATETIME
(TIME WITH TIME ZONE
), andZONED TIME
(TIMESTAMP WITH TIME ZONE
). For more information, see Values and types → property types.