Upgrade from older versions

This page contains the list of new features and breaking changes of the driver from version 5.28 to 6.x. For a full list of changes, see the driver changelog.

The latest driver version of the 6.x series is compatible with Neo4j server both 4.4, 5.x, and 202[56].x, so you can upgrade the driver before you upgrade the server. At the same time, the driver version 5.28 is forward compatible with Neo4j server 202[56].x, so you could also upgrade the server before the driver; however, given that it’s easier to roll back an application upgrade than a server upgrade, it’s recommended to start with the driver.

When upgrading the Neo4j server to a newer version, the Cypher queries in your application might also need updating. The Drivers Migration Assistent doesn’t cover Cypher changes.
See Cypher → Deprecations, additions, and compatibility.

New features

New type Vector

The type Vector allows for storing and retrieving Cypher VECTOR objects to/from the database. The VECTOR type is suitable for efficiently storing lists of homogeneous numbers, such as embeddings.

GQL status objects in errors

Error objects also expose errors as GQL-status objects. The main difference between Neo4j error codes and GQL error codes is that the latter are more granular. For more information, see Error handling.

Breaking changes and deprecations

Deprecated features are likely to be removed in the next major version.

Version Message Status

6.0

Session — Methods .readTransaction() and .writeTransaction() have been removed in favor of .executeRead() and .executeWrite().

Through the new methods, the first argument of transaction functions is a ManagedTransaction object. It behaves like a regular Transaction object, except it does not offer the .commit(), .rollback(), .close(), and .closed() methods.

Removed

6.0

Session — Method .lastBookmark() has been removed in favor of .lastBookmarks().

Removed

6.0

Notification — Property .severity has been removed. Use .rawSeverityLevel for the raw value and .severityLevel for an enumerated value.

Removed

6.0

ResultSummary — Attribute .updateStatistics has been removed in favor of .counters.

Removed

6.0

Driver — The return type of method .verifyConnectivity() changed from ServerInfo to void. To retrieve the server info, use .getServerInfo().

Changed

6.0

ServerInfo — The return type of attribute protocolVersion changed from number to ProtocolVersion.

Changed

5.0

Node, Relationship — Property .identity (NumberOrInteger) is deprecated in favor of .elementId (String).

Deprecated

5.0

Relationship — Properties .start and .end are deprecated in favor of .startNodeElementId and .endNodeElementId. Old identifiers were NumberOrInteger, whereas new ElementIds are string.

Deprecated

6.0

Neo4jError — Method .isRetriable() is deprecated in favor of .isRetryable().

Deprecated

6.0

Date — Method .fromStandardDate() is deprecated due to the unclear handling of timezones. .fromStandardDateLocal() is a drop in replacement, but .fromStandardDateUTC() may be more desireable to some users.

Deprecated

6.0

Notifications as Neo4j status codes are deprecated in favor of GQL status objects.

As a result,

Deprecated

6.0

Deprecated