Skip to content

Commit 915e6ee

Browse files
Merge pull request #201 from MacondoExpress/add-breaking-changes-on-migration-guide
Add breaking changes on migration guide
2 parents d721a77 + 19458b7 commit 915e6ee

File tree

1 file changed

+308
-2
lines changed

1 file changed

+308
-2
lines changed

modules/ROOT/pages/migration/index.adoc

Lines changed: 308 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,151 @@ npm update @neo4j/graphql
2020

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

23+
=== Changed minimum Node.js version to 20.0.0
24+
25+
The minimum Node.js version required to run the Neo4j GraphQL Library is now 20.0.0.
26+
27+
=== Changed minimum Neo4j version to 5.0.0
28+
29+
The minimum Neo4j version required to run the Neo4j GraphQL Library is now 5.0.0.
30+
31+
=== Removed the deprecated implicit "some" filter from `@relationship`
32+
33+
The deprecated implicit "some" filter without operator suffix has been removed from `@relationship` in favor of the explicit `_SOME` filter.
34+
35+
[cols="1,1"]
36+
|===
37+
|Before | Now
38+
39+
a|
40+
[source, graphql, indent=0]
41+
----
42+
{
43+
movies(where: { actors: { name: "Keanu" } }) {
44+
title
45+
}
46+
}
47+
----
48+
a|
49+
[source, graphql, indent=0]
50+
----
51+
{
52+
movies(where: { actors_SOME: { name: "Keanu" } }) {
53+
title
54+
}
55+
}
56+
----
57+
|===
58+
59+
=== Removed invalid filters in aggregation filter inputs
60+
61+
In previous versions of the library, the input used for aggregation filters contained filters that did not rely on aggregating functions.
62+
These filters were deprecated in previous library versions and are removed from the schema.
63+
64+
To see the aggregating functions supported on filtering refer to xref:/queries-aggregations/filtering.adoc#_aggregation_filtering[Aggregation filtering],
65+
66+
=== Removed string aggregation filters not using `_LENGTH`
67+
68+
Since string aggregations are computed using length, they now require the `_LENGTH` suffix for all string aggregation filters.
69+
70+
[cols="1,1"]
71+
|===
72+
|Before | Now
73+
74+
a|
75+
[source, graphql, indent=0]
76+
----
77+
{
78+
movies(
79+
where: { actorsAggregate: { node: { name_AVERAGE_EQUAL: 1.5 } } }
80+
) {
81+
title
82+
}
83+
}
84+
85+
----
86+
a|
87+
[source, graphql, indent=0]
88+
----
89+
{
90+
movies(
91+
where: { actorsAggregate: { node: { name_AVERAGE_LENGTH_EQUAL: 1.5 } } }
92+
) {
93+
title
94+
}
95+
}
96+
97+
----
98+
|===
99+
100+
=== Removed the deprecated `options` argument from `assertIndexesAndConstraints`
101+
102+
The deprecated `options` argument from the `assertIndexesAndConstraints` utility has been removed.
103+
Database migrations are outside of the scope of the Neo4j GraphQL Library, and all indexes and constraints will have to be managed manually.
104+
105+
106+
=== Removed top-level arguments that are not `update` from the top-level update
107+
108+
The top-level `update` mutation now only accepts the `update` argument.
109+
110+
The following nested operations have been moved into the `update` argument:
111+
112+
- `create`
113+
- `delete`
114+
- `connect`
115+
- `disconnect`
116+
- `connectOrCreate`
117+
118+
[cols="1,1"]
119+
|===
120+
|Before | Now
121+
122+
a|
123+
[source, graphql, indent=0]
124+
----
125+
mutation UpdateActors {
126+
updateActors(create: { movies: { node: { title: "The Good" } } }) {
127+
actors {
128+
name
129+
}
130+
}
131+
}
132+
----
133+
a|
134+
[source, graphql, indent=0]
135+
----
136+
mutation UpdateActors {
137+
updateActors(
138+
update: { movies: { create: { node: { title: "The Good" } } } }
139+
) {
140+
actors {
141+
name
142+
}
143+
}
144+
}
145+
----
146+
|===
147+
148+
=== Changed the sort argument for interfaces connection fields
149+
150+
The sort argument for interfaces connection fields is now a list of non-nullable elements.
151+
152+
[cols="1,1"]
153+
|===
154+
|Before | Now
155+
156+
a|
157+
[source, graphql, indent=0]
158+
----
159+
productionsConnection(after: String, first: Int, sort: [ProductionSort], where: ProductionWhere): ProductionsConnection!
160+
----
161+
a|
162+
[source, graphql, indent=0]
163+
----
164+
productionsConnection(after: String, first: Int, sort: [ProductionSort!], where: ProductionWhere): ProductionsConnection!
165+
----
166+
|===
167+
23168
=== The deprecated `_NOT` filters are no longer supported
24169

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

36-
37181
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.
38182

39183
[cols="1,1"]
@@ -94,6 +238,90 @@ query {
94238
----
95239
|===
96240

241+
=== Removed the bookmark field from the schema
242+
243+
The bookmark field has been removed from the mutation `info` responses (`CreateInfo`, `UpdateInfo`, `DeleteInfo`) as it is no longer required.
244+
245+
246+
=== Changed the `excludeDeprecatedFields` setting in the Neo4jFeaturesSettings
247+
248+
As in version 6.x many of the deprecated fields have been removed, the `excludeDeprecatedFields` setting has been modified to reflect these changes.
249+
250+
The following fields have been removed:
251+
252+
- `bookmark`
253+
- `negationFilters`
254+
- `arrayFilters`
255+
- `stringAggregation`
256+
- `aggregationFilters`
257+
- `nestedUpdateOperationsFields`
258+
259+
The following fields have been added:
260+
261+
262+
- `implicitEqualFilters`
263+
- `deprecatedOptionsArgument`
264+
- `directedArgument`
265+
266+
== Additions
267+
268+
=== Added the `_EQ` filter as an alternative to the deprecated implicit equal filters
269+
270+
The `count_EQ` filter is now available as an alternative to the deprecated `count` filter.
271+
272+
[cols="1,1"]
273+
|===
274+
|Before | Now
275+
276+
a|
277+
[source, graphql, indent=0]
278+
----
279+
{
280+
movies(where: { actorsAggregate: { count: 10 } }) {
281+
title
282+
}
283+
}
284+
----
285+
a|
286+
[source, graphql, indent=0]
287+
----
288+
{
289+
movies(where: { actorsAggregate: { count_EQ: 10 } }) {
290+
title
291+
}
292+
}
293+
----
294+
|===
295+
296+
=== Added the `_EQ` filter as an alternative to the deprecated implicit "equal" filter
297+
298+
The `_EQ` filter is now available as an alternative to the deprecated implicit "equal" filter.
299+
300+
[cols="1,1"]
301+
|===
302+
|Before | Now
303+
304+
a|
305+
[source, graphql, indent=0]
306+
----
307+
{
308+
movies(where: { title: "The Matrix" }) {
309+
title
310+
}
311+
}
312+
313+
----
314+
a|
315+
[source, graphql, indent=0]
316+
----
317+
{
318+
movies(where: { title_EQ: "The Matrix" }) {
319+
title
320+
}
321+
}
322+
----
323+
|===
324+
97325
== Deprecations and warnings
98326

99327
=== Implicit equality filters are deprecated
@@ -132,7 +360,6 @@ query {
132360
----
133361
|===
134362

135-
136363
=== `@node` will have to be explicitly defined
137364

138365
In the future, types without the `@node` directive will no longer be treated as Neo4j nodes.
@@ -169,3 +396,82 @@ type Person @node {
169396
----
170397
|===
171398

399+
=== Deprecated the implicit equality filters
400+
401+
Previously, if a field was present in a filter without specifying the operator, it was treated as an equality filter.
402+
This behavior is now deprecated and will be removed in the future.
403+
Use the `_EQ` filter instead.
404+
405+
[cols="1,1"]
406+
|===
407+
|Before | Now
408+
409+
a|
410+
[source, graphql, indent=0]
411+
----
412+
{
413+
movies(where: { title: "The Matrix" }) {
414+
title
415+
}
416+
}
417+
----
418+
a|
419+
[source, graphql, indent=0]
420+
----
421+
{
422+
movies(where: { title_EQ: "The Matrix" }) {
423+
title
424+
}
425+
}
426+
----
427+
|===
428+
429+
=== Deprecated pagination `options` argument
430+
431+
The `options` argument in query and `@relationship` fields is deprecated and will be removed in the future.
432+
Use the `limit`, `offset` and `sort` arguments instead.
433+
434+
[cols="1,1"]
435+
|===
436+
|Before | Now
437+
438+
a|
439+
[source, graphql, indent=0]
440+
----
441+
{
442+
movies(options: { limit: 10, offset: 10, sort: { title: ASC } }) {
443+
title
444+
}
445+
}
446+
----
447+
a|
448+
[source, graphql, indent=0]
449+
----
450+
{
451+
movies(limit: 10, offset: 10, sort: { title: ASC }) {
452+
title
453+
}
454+
}
455+
----
456+
|===
457+
458+
459+
=== Deprecated `directed` argument in `@relationship` fields
460+
461+
The `directed` argument was used to change the query direction of the relationship field at the query time, for instance:
462+
463+
464+
[source, graphql, indent=0]
465+
----
466+
{
467+
movies {
468+
title
469+
actors(directed: false) {
470+
name
471+
}
472+
}
473+
}
474+
----
475+
476+
The `directed` argument in `@relationship` fields is deprecated and will be removed in the future.
477+
Configure the query direction via the `queryDirection` and `direction` arguments of the `@relationship` directive instead.

0 commit comments

Comments
 (0)