You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/ROOT/pages/migration/index.adoc
+87-40Lines changed: 87 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -328,11 +328,10 @@ For example, an actor playing multiple roles in the same movie.
328
328
329
329
=== Changed behavior for multiple relationships between nodes
330
330
331
-
The way multiple relationships between the same two nodes are handled has changed:
331
+
The way multiple relationships are handled between the same two nodes has changed:
332
332
333
-
* In entity query fields (like `movies`), duplicate nodes will be removed and only distinct results will be returned, regardless of how many relationships exist between the nodes.
334
-
335
-
* In connection query fields (like `moviesConnection`), all relationships will be represented individually. This allows for projecting relationship properties for each connection between the two nodes.
333
+
* In entity query fields (like `movies`), duplicate nodes are removed and only distinct results are returned, regardless of how many relationships exist between the nodes.
334
+
* In connection query fields (like `moviesConnection`), all relationships are represented individually. This allows for projecting relationship properties for each connection between the two nodes.
336
335
337
336
For example, consider a scenario where Eddie Murphy played multiple roles in the same movie:
338
337
@@ -358,7 +357,7 @@ With a standard entity query:
358
357
}
359
358
----
360
359
361
-
The result will show "The Nutty Professor" only once (nodes are deduplicated):
360
+
The result shows "The Nutty Professor" only once (nodes are deduplicated):
362
361
363
362
[source, json, indent=0]
364
363
----
@@ -430,12 +429,13 @@ The result preserves both relationships with their distinct properties:
430
429
}
431
430
----
432
431
433
-
=== The `@private` directive has been removed.
432
+
=== Removed the `@private` directive
434
433
435
434
This directive was intended to be used with the library `@neo4j/graphql-ogm` which is no longer supported.
436
435
437
-
=== Schema generation fails if there are conflicting plural names in types
Schema generation now detects conflicting plural names in types and fails intentionally.
439
439
For example, the following schema will fail due to ambiguous `Techs` plural:
440
440
441
441
[source, graphql, indent=0]
@@ -487,8 +487,7 @@ type Movie @node @fulltext(
487
487
----
488
488
489
489
Full-text search was previously available in two different locations.
490
-
491
-
The following form has now been completely removed:
490
+
The following form has been completely removed:
492
491
493
492
[source, graphql, indent=0]
494
493
----
@@ -500,7 +499,7 @@ The following form has now been completely removed:
500
499
}
501
500
----
502
501
503
-
The root-level query has been changed to use the Relay Cursor Connections Specification:
502
+
The root-level query has been changed to use the https://relay.dev/graphql/connections.htm[Relay Cursor Connections Specification]:
504
503
505
504
[cols="1,1"]
506
505
|===
@@ -538,15 +537,15 @@ query {
538
537
----
539
538
|===
540
539
541
-
The new form uses the Relay Cursor Connections Specification, which allows for pagination using cursors and access to the `pageInfo` field.
540
+
The new form uses the https://relay.dev/graphql/connections.htm[Relay Cursor Connections Specification], which allows for pagination using cursors and access to the `pageInfo` field.
542
541
543
542
=== Removed implicit set operations
544
543
545
544
Implicit set operations in update mutations have been removed and the migration path involves two steps:
546
545
547
546
[cols="1,1"]
548
547
|===
549
-
| Before (Removed) | After (Desired Syntax)
548
+
| Before | After
550
549
551
550
a|
552
551
[source, graphql, indent=0]
@@ -583,9 +582,9 @@ The `implicitSet` option of `excludeDeprecatedFields` has been removed.
583
582
584
583
=== `@coalesce` directive affects projection field values
585
584
586
-
In version 7.0.0, the `@coalesce` directive now applies to both filter operations and field projections. Previously, the fallback values specified in the `@coalesce` directive were only used when those fields were used in filters, but not on the returned fields.
587
-
588
-
Now, when you select a field annotated with `@coalesce`, null values will be replaced with the specified fallback value in the query result.
585
+
In version 7.0.0, the `@coalesce` directive now applies to both filter operations and field projections.
586
+
Previously, the fallback values specified in the `@coalesce` directive were only used when those fields were used in filters, but not on the returned fields.
587
+
Now, when you select a field annotated with `@coalesce`, null values are replaced with the specified fallback value in the query result.
589
588
590
589
Consider this schema:
591
590
@@ -621,7 +620,7 @@ query {
621
620
}
622
621
----
623
622
624
-
Now, the same query will return the coalesced value:
623
+
Now, the same query returns the coalesced value:
625
624
626
625
[source, json, indent=0]
627
626
----
@@ -639,7 +638,8 @@ This ensures consistent behavior between filtering and projecting fields with th
639
638
640
639
=== Set `addVersionPrefix` to true by default
641
640
642
-
In version 7.0.0, the `addVersionPrefix` option is now set to `true` by default. This means that all generated Cypher queries will automatically be prefixed with the Cypher version:
641
+
In version 7.0.0, the `addVersionPrefix` option is set to `true` by default.
642
+
This means that all generated Cypher queries are automatically prefixed with the Cypher version:
643
643
644
644
[source, cypher, indent=0]
645
645
----
@@ -648,9 +648,10 @@ CYPHER 5
648
648
MATCH(this:Movie)
649
649
----
650
650
651
-
This ensures that the correct Cypher version is used when queries are executed in Neo4j. However, this change may be incompatible with older versions of Neo4j.
651
+
This ensures that the correct Cypher version is used when queries are executed in Neo4j.
652
+
However, this change may be incompatible with older versions of Neo4j.
652
653
653
-
If you need to disable this behavior, you can set `cypherQueryOptions.addVersionPrefix` to `false` in the context:
654
+
Set `cypherQueryOptions.addVersionPrefix` to `false` to disable this behavior:
=== Changed DateTime and Time value conversion behavior
681
+
=== Changed `DateTime` and `Time` value conversion behavior
681
682
682
-
In version 7.0.0, `DateTime` and `Time` values are now converted from strings into temporal types directly in the generated Cypher queries, rather than in server code using the Neo4j driver.
683
+
In version 7.0.0, `DateTime` and `Time` values are converted from Strings to temporal types directly in the generated Cypher queries, rather than in server code using the Neo4j driver.
683
684
684
-
For example, if you have a date string in your GraphQL query:
685
+
For example, if you have a date String in your GraphQL query:
685
686
686
687
[source, graphql, indent=0]
687
688
----
@@ -702,14 +703,16 @@ WHERE this.releaseDate > datetime($param0)
702
703
RETURN this { .title, .releaseDate } as this
703
704
----
704
705
705
-
=== Mutation operations now follow the relationship direction defined in the `@relationship` argument queryDirection
Mutation operations now respect the `queryDirection` value defined in the `@relationship` directive when matching existing relationships. This ensures consistent behavior between queries and mutations regarding how relationships are traversed.
708
+
Mutation operations now respect the `queryDirection` value defined in the `@relationship` directive when matching existing relationships.
709
+
This ensures consistent behavior between queries and mutations regarding how relationships are traversed.
708
710
709
-
Important to note:
710
-
711
-
- When creating new relationships, the physical direction stored in the database is still determined by the `direction` argument.
712
-
- The change affects only how existing relationships are matched during mutation operations.
711
+
[NOTE]
712
+
====
713
+
When creating new relationships, the physical direction stored in the database is still determined by the `direction` argument.
714
+
The change affects only how existing relationships are matched during mutation operations.
715
+
====
713
716
714
717
For example, consider the following schema:
715
718
@@ -726,13 +729,13 @@ type Person @node {
726
729
}
727
730
----
728
731
729
-
With `queryDirection: UNDIRECTED`, mutations will now traverse existing relationships in both directions when matching nodes, regardless of the base `direction` value. This is consistent with how queries work with the same directive configuration.
730
-
732
+
With `queryDirection: UNDIRECTED`, mutations now traverse existing relationships in both directions when matching nodes, regardless of the base `direction` value.
733
+
This is consistent with how queries work with the same directive configuration.
731
734
Previously, mutations would always follow the explicit `direction` value when matching existing relationships, which could lead to inconsistent behavior between queries and mutations.
732
735
733
736
=== Moved `where` field in nested update operations
734
737
735
-
The `where` field for nested update operations has been removed, in favour of the `where` inside the nested update input.
738
+
The `where` field for nested update operations has been removed in favor of the `where` inside the nested update input.
736
739
737
740
[cols="1,1"]
738
741
|===
@@ -802,7 +805,8 @@ type Actor @node {
802
805
}
803
806
----
804
807
805
-
Previously, when using `single` or `some` filters with unions, conditions inside these filters were evaluated separately for each concrete type in the union, requiring all of them to match. This was incorrect behavior.
808
+
Previously, when using `single` or `some` filters with unions, conditions inside these filters were evaluated separately for each concrete type in the union, requiring all of them to match.
809
+
This behavior was incorrect.
806
810
807
811
[source, graphql, indent=0]
808
812
----
@@ -823,15 +827,54 @@ The fixed behavior in version 7.0.0:
823
827
* `some`: Now correctly returns actors with at least one matching related node of any type in the union.
824
828
825
829
This change provides more logical and consistent results, but may affect existing queries that relied on the previous behavior.
826
-
827
830
This fix applies to both the new filter syntax and the deprecated filters (e.g., `actedIn_SINGLE` and `actedIn_SOME`).
828
831
832
+
=== List of nullable elements no longer supported
833
+
834
+
A list of nullable elements is no longer supported in types annotated with the `@node` directive, for example in the following type definition:
835
+
836
+
[source, graphql, indent=0]
837
+
----
838
+
type Actor @node {
839
+
name: String
840
+
pseudonyms: [String]!
841
+
}
842
+
----
843
+
844
+
This is due the fact that Neo4j does not support storing null values as part of a list.
845
+
To create a similar but supported type definition, change the value of the `pseudonyms` field to a non-nullable list: `[String!]!`.
846
+
847
+
=== Interfaces and unions disallow mixing types with and without the `@node` directive
848
+
849
+
Interfaces and unions can only be implemented by types that are all annotated with the `@node` directive or none of them.
850
+
851
+
Type definitions like the following are no longer supported because the `Series` type is missing the `@node` directive:
852
+
853
+
[source, graphql, indent=0]
854
+
----
855
+
interface Production @node {
856
+
title: String
857
+
}
858
+
type Movie @node implements Production {
859
+
title: String
860
+
}
861
+
type Series implements Production {
862
+
title: String
863
+
}
864
+
----
865
+
866
+
=== Relationship fields require `@node` types
867
+
868
+
The `@relationship` directive can only be applied to fields whose types are annotated with the `@node` directive.
869
+
870
+
This also applies to fields defined as interfaces and unions where they must be implemented exclusively by `@node` types.
The relationship filtering syntax outside dedicated input like `_SOME`, `_ALL`, and `_NONE` is now deprecated. You should use the dedicated input object versions:
1068
+
The relationship filtering syntax outside dedicated input like `_SOME`, `_ALL`, and `_NONE` is now deprecated.
0 commit comments