Additions, deprecations, removals, and compatibility

Cypher® is a language that is constantly evolving. New features are added to the language continuously, and occasionally, some features become deprecated and are subsequently removed. All changes to Cypher are introduced in Neo4j versions.

This section lists all of the features that have been removed, deprecated, added, or extended in different versions of Neo4j. Replacement syntax for deprecated and removed features are also indicated.

Cypher 25 was introduced in Neo4j 2025.06 and can only be used on Neo4j 2025.06+ databases. Features removed in Cypher 25 are still available on Neo4j 2025.06+ databases either by prepending a query with CYPHER 5 or by having Cypher 5 as the default language for the database. For more information, see Select Cypher version.

Neo4j 2025.11

Updated in Cypher 25

Feature Details

Functionality New

RETURN coll.distinct([true, false, false, true, true, false])
RETURN coll.flatten([1, [2]]), coll.flatten([false, ['a']], 2);
RETURN coll.indexOf(['A', 'new', 'function'], 'new');
RETURN coll.insert([1, 2, 4], 2, 3);
RETURN coll.max([1.5, 2, 5.4, 0, 4]);
RETURN coll.min([1.5, 2, 5.4, 0, 4]);
RETURN coll.remove(['a', 'a', 'b', 'c', 'd'], 2);
RETURN coll.sort([3, 1, 4, 2, 'a', 'c', 'b']);

Introduction of eight new collection-based Cypher functions. For more information, see Functions → List functions.

Functionality New

Two new performance-improving operators: MergeInto and MergeUniqueNode.

Both are similar to the Merge operator, but:

  • MergeInto is used when the start and end node of the pattern is matched outside the MERGE pattern;

  • MergeUniqueNode is used when there is a property uniqueness constraint on the property used in the MERGE statement.

Neo4j 2025.10

New in Cypher 25

Feature Details

Functionality New

VECTOR([1.05, 0.123, 5], 3, FLOAT32 NOT NULL)

Introduced a VECTOR value type that can be stored as embedding properties on nodes and relationships and utilized for efficient semantic retrieval using Neo4j’s vector indexes and GenAI plugin. For more information, see Values and types → Vectors.

Functionality New

WITH vector([1, 2, 3], 3, INTEGER) AS vector
RETURN vector, valueType(vector) AS vectorType

New vector() function for the construction of VECTOR values.

Functionality New

RETURN vector_dimension_count(vector([1, 2, 3], 3, INTEGER)) AS size

New vector_dimension_count() function, which returns the dimension of a VECTOR value.

Functionality New

RETURN vector_distance(vector([1, 2, 3], 3, INT), vector([1, 2, 4], 3, INT), COSINE) AS distance

New vector_distance() function, which returns the distance between two VECTOR values based on the selected vectorDistanceMetric algorithm.

Functionality New

RETURN vector_norm(vector([1.0, 5.0, 3.0, 6.7], 4, FLOAT), EUCLIDEAN) AS norm

New vector_norm() function, which returns the distance between the given vector and an origin vector, which is a vector with the same dimension with all coordinates set to zero, calculated using the specified vectorDistanceMetric.

Functionality New

CREATE CONSTRAINT node_vector_constraint
FOR (n:Movie) REQUIRE n.embedding IS :: VECTOR<INT32>(42)
CREATE CONSTRAINT rel_vector_constraint
FOR ()-[r:CONTAINS]->() REQUIRE r.embedding IS :: VECTOR<FLOAT32>(1536)

Introduced VECTOR property type constraints. For more information, see Create property type constraints.

Updated in Cypher 25

Feature Details

Functionality Updated

RETURN toFloatList(Vector([1, 2, 3], 3, INTEGER64)),
       toIntegerList(Vector([1, 2, 3], 3, INTEGER8)),
       vector.similarity.cosine(vector([3, 5, 7], 3, INT), vector([-1, -2, -3], 3, INT)),
       vector.similarity.euclidean(vector([3, 5, 7], 3, INT), vector([-1, -2, -3], 3, INT))

The toFloatList(), toIntegerList(), vector.similarity.cosine(), and vector.similarity.euclidean() functions now accept VECTOR values as input arguments.

Functionality Updated

RETURN datetime('11/18/1986', "MM/dd/yyyy") AS dt

The following constructors of temporal types have been extended with the optional argument pattern: date(), datetime(), localdatetime(), localtime(), time() and duration(). These patterns are the same as those used to create temporal strings with the format() function introduced in 2025.09 and thus allow for the parsing of temporal strings into temporal values.

Neo4j 2025.09

New in Cypher 25

Feature Details

Functionality New

WITH datetime('1986-11-18T6:04:45.123456789+01:00[Europe/Berlin]') AS dt
RETURN format(dt, "MM/dd/yyyy") AS US, format(dt, "dd/MM/yyyy") AS EU

Cypher’s new format() function can create dynamically formatted string representations of temporal instance and duration types.

Functionality New

New operator: LockNodes

Introduced LockNodes operator, sometimes used in conjunction with the LockingMerge operator to lock nodes.

Neo4j 2025.08

Updated in Cypher 25

Feature Details

Functionality Updated

MATCH (p:Product) WHERE p.name <> "Coffee"
CALL (p) {
    MATCH (p)<-[:BUYS]-(c:Customer)-[:BUYS]->(otherProduct)
    RETURN c, otherProduct
    NEXT
    RETURN count(DISTINCT c) AS customers, 0 AS customersAlsoBuyingCoffee
    UNION
    FILTER otherProduct.name = "Coffee"
    RETURN 0 as customers, count(DISTINCT c) AS customersAlsoBuyingCoffee
    NEXT
    RETURN max(customers) AS customers, max(customersAlsoBuyingCoffee) AS customersAlsoBuyingCoffee
}
RETURN p.name AS product,
       round(toFloat(customersAlsoBuyingCoffee) * 100 / customers, 1) AS percentageOfCustomersAlsoBuyingCoffee
  ORDER BY product

NEXT now correctly supports aggregations in the context of UNION and CALL. For more information, see Sequential queries (NEXT) > Known issues and fixes.

Functionality Updated

PROFILE
WITH "Person" AS label
MATCH (people:$(label))
RETURN people.name

Cypher can now leverage token lookup indexes when planning queries with dynamic labels and relationship types. This is enabled by the introduction of three new query plan operators: DynamicLabelNodeLookup, DynamicDirectedRelationshipTypeLookup, and DynamicUndirectedRelationshipTypeLookup.

New in Cypher 25

Feature Details

Functionality New

MATCH (()-->(n))+
WHERE allReduce(acc = 0, node IN n | acc + node.x, 6 < acc < 30)
RETURN [i IN n | i.x] AS sequence
ORDER BY head(n).x, size(n)

New allReduce() function. It enables the stepwise evaluation of a value accumulated over a path, allowing for early pruning of paths that do not satisfy a given predicate, and is optimized for path expansions.

Neo4j 2025.07

Updated in Cypher 25

Feature Details

Functionality Updated

MATCH (n)-[r]->()
WHERE n:$(<expr1>)
WITH n, r:$(<expr2>) AS hasType
RETURN n:$(<expr3>)

Added the ability to dynamically reference node labels and relationship types in places where label expressions are allowed.

Neo4j 2025.06

Removed in Cypher 25

Feature Details

Functionality Removed

CREATE DATABASE db OPTIONS { seedCredentials: ... }

The option seedCredentials is removed from the CREATE DATABASE OPTIONS map. For more information, see Operations Manual → Database administration → Create databases.

Functionality Removed

CREATE DATABASE db OPTIONS { existingDataSeedInstance: ... }

The option existingDataSeedInstance is removed from the CREATE DATABASE OPTIONS map and replaced by existingDataSeedServer. For more information, see Operations Manual → Database administration → Create databases.

Functionality Removed

CREATE ALIAS composite.`1` FOR DATABASE neo4j
USE composite.`1`

Graph references with separately backticked name parts have been removed. Use parameters or backtick the entire name, e.g. USE `composite.1`

Functionality Removed

RETURN 1 as my\u0085identifier

The Unicode character \u0085 (Next Line) has been removed for unescaped identifiers and is now considered a whitespace character. To continue using it, escape the identifier by adding backticks (``) around it. This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. In the given example, the quoted identifier would be my\u0085identifier.

Functionality Removed

RETURN 1 as my$Identifier

The character with the Unicode representation \u0024 ($) has been removed for unescaped identifiers. To continue using it, escape the identifier by adding backticks (``) around the identifier. This applies to all unescaped identifiers in Cypher, such as label expressions, properties, variable names, or parameters. In the given example, the quoted identifier would be my\u0024identifier.

The following Unicode Characters are removed in identifiers: \u0000, \u0001, \u0002, \u0003, \u0004, \u0005, \u0006, \u0007, \u0008, \u000E, \u000F, \u0010, \u0011, \u0012, \u0013, \u0014, \u0015, \u0016, \u0017, \u0018, \u0019, \u001A, \u001B, \u007F, \u0080, \u0081, \u0082, \u0083, \u0084, \u0086, \u0087, \u0088, \u0089, \u008A, \u008B, \u008C, \u008D, \u008E, \u008F, \u0090, \u0091, \u0092, \u0093, \u0094, \u0095, \u0096, \u0097, \u0098, \u0099, \u009A, \u009B, \u009C, \u009D, \u009E, \u009F, \u0024, \u00A2, \u00A3, \u00A4, \u00A5, \u00AD, \u0600, \u0601, \u0602, \u0603, \u0604, \u0605, \u061C, \u06DD, \u070F, \u08E2, \u180E, \u200B, \u200C, \u200D, \u200E, \u200F, \u202A, \u202B, \u202C, \u202D, \u202E, \u2060, \u2061, \u2062, \u2063, \u2064, \u2066, \u2067, \u2068, \u2069, \u206A, \u206B, \u206C, \u206D, \u206E, \u206F, \u2E2F, \uFEFF, \uFFF9, \uFFFA, \uFFFB

Functionality Removed

MATCH (n)-[r:REL]->(m) SET n = r;
MATCH (n)-[r:REL]->(m) SET n += r;
MATCH (n)-[r:REL]->(m) SET r = n;
MATCH (n)-[r:REL]->(m) SET r += n;

Using a NODE or RELATIONSHIP instead of a MAP on the RHS of a SET properties clause is no longer supported. Instead, use the properties() function to get the map of properties from nodes or relationships, which can then be used in the SET clause.

MATCH (n)-[r:REL]->(m) SET n = properties(r)

Functionality Removed

REVOKE READ {*} ON GRAPH * NODES A FROM missingUser
REVOKE ROLE missingRole FROM bob

Errors have replaced notifications for impossible REVOKE commands where a user, role, or database does not exist.

Functionality Removed

MERGE (a {foo:1})-[:T]->(b {foo:a.foo})

It is no longer possible to specify a property of one entity (node or relationship) by referring to another entity’s property within the same MERGE clause.

Functionality Removed

CREATE ... INDEX ... OPTIONS { indexProvider: ... }
CREATE ... CONSTRAINTS ... OPTIONS { indexProvider: ... }

Specifying an index provider in the OPTIONS map when creating an index or constraint is no longer supported.

Functionality Removed

db.create.setVectorProperty()
db.index.vector.createNodeIndex()
dbms.cluster.readReplicaToggle()
dbms.cluster.uncordonServer()
dbms.quarantineDatabase()
dbms.upgrade()
dbms.upgradeStatus()

These procedures have been removed from Cypher 25. For more information, see the Operations Manual → Procedures.

Deprecated in Cypher 25

Feature Details

Functionality Deprecated

CREATE DATABASE db OPTIONS { existingData: ... }

The option existingData is deprecated. For more information, see Operations Manual → Database administration → Create databases.

Updated in Cypher 25

Feature Details

Functionality Updated

WITH 1 AS g
RETURN COLLECT {
        UNWIND [1,2,3] AS x
        WITH * WHERE x < 0
        WITH count(*) AS agg
        RETURN agg + g
} AS x

Imported variables are now correctly handled as constants inside COLLECT, COUNT, and EXISTS subquery expressions. The example query previously returned no results ([]) because the imported variable was used incorrectly as an implicit grouping key. It now returns [1], since the variable is not used as a grouping key, allowing count(*) to return 0 and 0 + g to evaluate to 1.

Functionality Updated

RETURN $0hello

Parameters can start with extended identifier characters (such as numbers), in line with the GQL standard. For more information, see Parameters.

Functionality Updated

MATCH SHORTEST $param (:A)-[:R]->{0,10}(:B)
MATCH p = ANY $param (:A)-[:R]->{0,10}(:B)
MATCH SHORTEST $param GROUPS (:A)-[:R]->{0,10}(:B)

Parameters can now be used in SHORTEST and ANY path patterns.

Functionality Updated

CALL db.schema.nodeTypeProperties() YIELD propertyTypes RETURN propertyTypes;
CALL db.schema.relTypeProperties() YIELD propertyTypes RETURN propertyTypes;

The column propertyTypes returned by the procedures db.schema.nodeTypeProperties() and db.schema.relTypeProperties() previously returned a list of strings representing the potential Java types for a given property. It now returns a list of strings representing the possible Cypher Types the given property has. For all available Cypher types, see the section on types and their synonyms.

Syntax Updated

SHOW NODE PROPERTY UNIQUENESS CONSTRAINTS
SHOW RELATIONSHIP PROPERTY UNIQUENESS CONSTRAINTS
SHOW PROPERTY UNIQUENESS CONSTRAINTS

The constraint type keyword filtering for SHOW CONSTRAINTS now allows the optional keyword PROPERTY when filtering on property uniqueness constraints. The constraint type column returned is also updated to return NODE_PROPERTY_UNIQUENESS and RELATIONSHIP_PROPERTY_UNIQUENESS.

Functionality Updated

SHOW TRANSACTIONS YIELD startTime, clientAddress, outerTransactionId, currentQuery, currentQueryId, parameters, planner, runtime, indexes, currentQueryStartTime, currentQueryElapsedTime, currentQueryCpuTime, currentQueryIdleTime, currentQueryStatus

Several SHOW TRANSACTIONS columns have been updated:

  • startTime and currentQueryStartTime now return a ZONED DATETIME instead of a STRING representation of a temporal value.

  • clientAddress and outerTransactionId now return null instead of an empty STRING when unavailable.

  • The current query-related columns — currentQuery, currentQueryId, parameters, planner, runtime, indexes, currentQueryStartTime, currentQueryElapsedTime, currentQueryCpuTime, currentQueryIdleTime, and currentQueryStatus — now return null when no query is executing.

Functionality Updated

USE graph.byName('composite.with.dot.constituent')
USE graph.propertiesByName('composite.with.dot.constituent')

Graph references in the arguments of the functions graph.byName and graph.propertiesByName now require no syntactic quotes.

In Cypher 5, if a composite database or constituent name contains dots, those name parts have to be wrapped in quotes to resolve the name correctly, e.g., USE graph.byName('`composite.with.dot`.constituent').

Functionality Updated

CREATE (:Person)
MATCH (p:Person)
RETURN count(p) AS count

Queries no longer require WITH to transition between reading and writing operations. For more information, see Clause composition → Read-write queries.

Functionality Updated

RETURN replace("hello world", "l", "", 1)

The replace() function now accepts an optional limit argument, defining the number of times the search string is replaced.

New in Cypher 25

Feature Details

Functionality New

CREATE [COMPOSITE] DATABASE actors SET DEFAULT LANGUAGE CYPHER 25

Set the default Cypher version for a standard or composite database when creating it. The available versions are CYPHER 25 and CYPHER 5. If not specified, the default language for the database is set to the default language of the DBMS. For more information, see the following sections in the Operations Manual:

Functionality New

CREATE ALIAS `remote-with-default-language`
FOR DATABASE `northwind-graph-2020`
    AT "neo4j+s://location:7687"
    USER alice
    PASSWORD 'example_secret'
    DEFAULT LANGUAGE CYPHER 25

Set the default Cypher version for a remote database alias when creating it. The available versions are CYPHER 5 and CYPHER 25. Local database aliases and database aliases in composite databases cannot be assigned a default Cypher version. Local database aliases always have the Cypher version of their target database and database aliases in composite databases always have the Cypher version of the composite database they belong to. For more information, see the Operations Manual → Set a default Cypher version for remote database aliases.

Functionality New

ALTER DATABASE movies SET DEFAULT LANGUAGE CYPHER 25

Alter the default Cypher version of an existing standard or composite database. The available versions are CYPHER 25 and CYPHER 5. For more information, see the Operations Manual → Alter the default Cypher version of an existing database.

Functionality New

ALTER ALIAS `remote-with-default-language` SET DATABASE DEFAULT LANGUAGE CYPHER 25

Alter the default Cypher version of a remote database alias. The available versions are CYPHER 25 and CYPHER 5. It is not possible to alter the default Cypher version of a local database alias or an alias belonging to a composite database. Local database aliases always have the Cypher version of their target database and aliases belonging to composite databases always have the Cypher version of the composite database. For more information, see the Operations Manual → Alter the default Cypher version of a remote database alias.

Functionality New

SHOW DATABASES YIELD name, defaultLanguage

The new return column defaultLanguage for the SHOW DATABASE command returns the default language of a database. This column is not returned by default; it can only be returned using YIELD. For more information, see the Operations Manual → Show the default Cypher version of a database.

Functionality New

SHOW ALIAS `remote-with-default-language` FOR DATABASE YIELD name, defaultLanguage

The new return column defaultLanguage for the SHOW ALIAS command returns the default language of a database alias. This column is not returned by default; it can only be returned using YIELD. For more information, see the Operations Manual → List database aliases.

Functionality New

CYPHER 25
MATCH (n:Person)
FILTER n.age < 35
RETURN n.name AS name

New query option: CYPHER 25. Prepending a query with CYPHER 25 ensures that a query is run with Cypher 25, regardless of the default language of a database. (The ability to select CYPHER 5 was introduced in Neo4j 5.21).

Functionality New

RETURN 1 AS a

NEXT

RETURN 1 AS b

New NEXT keyword used for linear composition of queries. For more information, see Sequential queries (NEXT).

Functionality New

MATCH (s:Supplier)-[:SUPPLIES]->(p:Product)
LET supplier =  s.name
RETURN supplier, p.name AS product

New LET clause used to bind values to variables.

Functionality New

UNWIND [1, 2, 3, 4, 5, 6] AS x
FILTER x > 2
RETURN x
LOAD CSV WITH HEADERS FROM 'file:///companies.csv' AS row
FILTER row.Id IS NOT NULL
MERGE (c:Company {id: row.Id})

New FILTER clause used to filter queries, similar to WHERE.

Functionality New

WHEN false THEN RETURN 1 AS x
WHEN true THEN RETURN 2 AS x
ELSE RETURN 3 AS x
 MATCH (n:Person)
 OPTIONAL MATCH (n)-[:KNOWS]->(m)
 CALL (*) {
   WHEN m IS NULL THEN {
      CREATE (f: Person {name: 'Peter', age: n.age}),
      (n)-[:KNOWS]->(f)
         RETURN f, n.name AS newConnection
   }
 }
RETURN f.name AS newNode,
       collect(newConnection) AS newConnections

Introduction of WHEN/ELSE branches which enable the composition of conditional queries, similar to the IF statement in other programming languages. For more information, see Conditional queries (WHEN).

Functionality New

{
   MATCH (n:Actor)
   RETURN n.name AS name
   UNION
   MATCH (n:Director)
   RETURN n.name AS name
}
UNION ALL
MATCH (n:Movie)
RETURN n.title AS name

UNION [DISTINCT] and UNION ALL can now be combined in the same query by using curly braces. For more information, see Combining UNION and UNION ALL.

Functionality New

CREATE DATABASE db OPTIONS { seedRestoreUntil: ... }

The option seedRestoreUntil can now be specified in the CREATE DATABASE OPTIONS map. This allows a database to be seeded up to a specific date or transaction ID. For more information, see Operations Manual → Database administration → Create a database from a URI.

Functionality New

CREATE DATABASE db OPTIONS { seedSourceDatabase: ... }

You can specify the name of a source database if the seedURI points to a folder containing backups for multiple databases. For more information, see Operations Manual → Database administration → Create databases.

Functionality New

RETURN cosh(0.5), coth(0.5), sinh(0.5), tanh(0.5)

Introduction of four new hyperbolic trigonometric Cypher functions. For more information, see Mathematical functions - trigonometric.

Functionality New

MATCH (n)
RETURN ALL n.prop AS prop

The keyword ALL can now be added after a RETURN as the explicit form of a RETURN without duplicate removal.

Functionality New

MATCH (n)
WITH ALL n.prop AS prop
RETURN prop

The keyword ALL can now be added after a WITH as the explicit form of a WITH without duplicate removal.

Functionality New

MATCH REPEATABLE ELEMENTS p = (:B)-->{,5}()
RETURN [n IN nodes(p) | n.q] AS nodes

New match mode, REPEATABLE ELEMENTS. This is a non-restrictive match mode, in which relationships matched across all constituent path patterns in a graph pattern can be repeatedly traversed.

Functionality New

MATCH DIFFERENT RELATIONSHIPS p = (:B)-->{,5}()
RETURN [n IN nodes(p) | n.q] AS nodes

New keyword, DIFFERENT RELATIONSHIPS, which enables explicitly specifying Cypher’s default mode. This is a restrictive match mode, which requires that all relationships matched across all constituent path patterns in a graph pattern must be unique. Specifying DIFFERENT RELATIONSHIPS is functionally equivalent to not specifying a match mode.