Skip to content
Merged
310 changes: 308 additions & 2 deletions modules/ROOT/pages/migration/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,151 @@ npm update @neo4j/graphql

Here is a list of all the breaking changes from version 5.0.0 to 6.0.0.

=== Changed minimum Node.js version to 20.0.0

The minimum Node.js version required to run the Neo4j GraphQL Library is now 20.0.0.

=== Changed minimum Neo4j version to 5.0.0

The minimum Neo4j version required to run the Neo4j GraphQL Library is now 5.0.0.

=== Removed the deprecated `@relationship` implicit `_SOME` filters

The deprecated `@relationship` filter without the operator suffix has been removed in favor of the `_SOME` filter.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
{
movies(where: { actors: { name: "Keanu" } }) {
title
}
}
----
a|
[source, graphql, indent=0]
----
{
movies(where: { actors_SOME: { name: "Keanu" } }) {
title
}
}
----
|===

=== Invalid filters in Aggregation filter inputs are being removed

In previous versions of the Library, the input used for aggregation filters contained filters that did not rely on aggregating functions. Those filters were deprecated in previous Library versions and removed from the schema.

To see the aggregating functions supported on filtering refer to xref:/queries-aggregations/filtering.adoc#_aggregation_filtering[Aggregation filtering],

=== String aggregation filters that are not using `_LENGTH` are removed

String aggregations are computed using lengths, and the `_LENGTH` suffix is now required for all string aggregation filters.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
{
movies(
where: { actorsAggregate: { node: { name_AVERAGE_EQUAL: 1.5 } } }
) {
title
}
}

----
a|
[source, graphql, indent=0]
----
{
movies(
where: { actorsAggregate: { node: { name_AVERAGE_LENGTH_EQUAL: 1.5 } } }
) {
title
}
}

----
|===

=== Removed the deprecated `options` argument from `assertIndexesAndConstraints`

The deprecated `options` argument from the `assertIndexesAndConstraints` utility has been removed.
Database migrations are outside of the scope of the Neo4j GraphQL Library, and all indexes and constraints will have to be managed manually.


=== Removed top-level argument that are not `update` from the top-level update

The top-level `update` mutation now only accepts the `update` argument.

The nested operation:

- create
- create
- delete
- connect
- disconnect
- connectOrCreate

Are now moved into the `update` argument.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
mutation UpdatePeople {
updatePeople(create: { movies: { node: { title: "The Good" } } }) {
people {
name
}
}
}
----
a|
[source, graphql, indent=0]
----
mutation UpdatePeople {
updatePeople(create: { movies: { node: { title: "The Good" } } }) {
people {
name
}
}
}
----
|===

=== Changed the sort argument for interfaces Connection fields

The sort argument for interfaces Connection fields is now a list of non nullable element.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection!
----
a|
[source, graphql, indent=0]
----
productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection!
----
|===

=== The deprecated `_NOT` filters are no longer supported

The following deprecated `NOT` filters are removed from the schema since they are no longer supported:
Expand All @@ -33,7 +178,6 @@ The following deprecated `NOT` filters are removed from the schema since they ar
- `node_NOT`
- `edge_NOT`


To achieve the same in version 6.x of the GraphQL library, use the xref:/queries-aggregations/filtering.adoc#_boolean_operators[boolean `NOT` operator] instead.

[cols="1,1"]
Expand Down Expand Up @@ -94,6 +238,91 @@ query {
----
|===

=== The bookmark field has been removed from the schema

The bookmark field has been removed from the Mutation info response as it is no longer required.


=== The `excludeDeprecatedFields` setting in the Neo4jFeaturesSettings has been changed

As in version 6.x many of the deprecated fields have been removed, the `excludeDeprecatedFields` setting has been modified to reflect these changes.

The following fields have been removed:


- `bookmark`
- `negationFilters`
- `arrayFilters`
- `stringAggregation`
- `aggregationFilters`
- `nestedUpdateOperationsFields`

The following fields have been added:


- `implicitEqualFilters`
- `deprecatedOptionsArgument`
- `directedArgument`

== Additions

=== Added `count_EQ` as alternative to the deprecated count

The `count_EQ` filter is now available as an alternative to the deprecated `count` filter.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
{
movies(where: { actorsAggregate: { count: 10 } }) {
title
}
}
----
a|
[source, graphql, indent=0]
----
{
movies(where: { actorsAggregate: { count_EQ: 10 } }) {
title
}
}
----
|===

=== Added the _EQ filter as alternative of the deprecated implicit equal filters

The `_EQ` filter is now available as an alternative to the deprecated implicit equal filters.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
{
movies(where: { title: "The Matrix" }) {
title
}
}

----
a|
[source, graphql, indent=0]
----
{
movies(where: { title_EQ: "The Matrix" }) {
title
}
}
----
|===

== Deprecations and warnings

=== Implicit equality filters are deprecated
Expand Down Expand Up @@ -132,7 +361,6 @@ query {
----
|===


=== `@node` will have to be explicitly defined

In the future, types without the `@node` directive will no longer be treated as Neo4j nodes.
Expand Down Expand Up @@ -169,3 +397,81 @@ type Person @node {
----
|===

=== Deprecated the implicit equality filters

Previously when a field in a filter was present in filter without specifying the operator, it was treated as an equality filter.

This behavior is now deprecated and will be removed in the future. Please, use the `_EQ` filter.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
{
movies(where: { title: "The Matrix" }) {
title
}
}
----
a|
[source, graphql, indent=0]
----
{
movies(where: { title_EQ: "The Matrix" }) {
title
}
}
----
|===

=== Deprecated pagination `options` argument

The `options` argument in query and `@relationship` fields is deprecated and will be removed in the future. Use the `limit`, `offset` and `sort` arguments instead.

[cols="1,1"]
|===
|Before | Now

a|
[source, graphql, indent=0]
----
{
movies(options: { limit: 10, offset: 10, sort: { title: ASC } }) {
title
}
}
----
a|
[source, graphql, indent=0]
----
{
movies(limit: 10, offset: 10, sort: { title: ASC }) {
title
}
}
----
|===


=== Deprecated `directed` argument in `@relationship` fields

The `directed` argument was used to change the query direction of the relationship field at the query time, for instance:


[source, graphql, indent=0]
----
{
movies {
title
actors(directed: false) {
name
}
}
}
----

The `directed` argument in `@relationship` fields is deprecated and will be removed in the future.
Please configure this using `queryDirection` and `direction` arguments of the `@relationship` directive.