Skip to content

Commit ee66ebe

Browse files
document lastly merged breaking changes
2 parents 8b8ce0a + f684348 commit ee66ebe

File tree

1 file changed

+77
-30
lines changed

1 file changed

+77
-30
lines changed

modules/ROOT/pages/migration/index.adoc

Lines changed: 77 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ With a standard entity query:
358358
}
359359
----
360360

361-
The result will show "The Nutty Professor" only once (nodes are deduplicated):
361+
The result shows "The Nutty Professor" only once (nodes are deduplicated):
362362

363363
[source, json, indent=0]
364364
----
@@ -430,12 +430,13 @@ The result preserves both relationships with their distinct properties:
430430
}
431431
----
432432

433-
=== The `@private` directive has been removed.
433+
=== Removed the `@private` directive
434434

435435
This directive was intended to be used with the library `@neo4j/graphql-ogm` which is no longer supported.
436436

437-
=== Schema generation fails if there are conflicting plural names in types
437+
=== Schema generation avoids conflicting plural names
438438

439+
Schema generation now detects conflicting plural names in types and fails intentionally.
439440
For example, the following schema will fail due to ambiguous `Techs` plural:
440441

441442
[source, graphql, indent=0]
@@ -487,8 +488,7 @@ type Movie @node @fulltext(
487488
----
488489

489490
Full-text search was previously available in two different locations.
490-
491-
The following form has now been completely removed:
491+
The following form has been completely removed:
492492

493493
[source, graphql, indent=0]
494494
----
@@ -583,9 +583,9 @@ The `implicitSet` option of `excludeDeprecatedFields` has been removed.
583583

584584
=== `@coalesce` directive affects projection field values
585585

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.
586+
In version 7.0.0, the `@coalesce` directive now applies to both filter operations and field projections.
587+
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.
588+
Now, when you select a field annotated with `@coalesce`, null values are replaced with the specified fallback value in the query result.
589589

590590
Consider this schema:
591591

@@ -621,7 +621,7 @@ query {
621621
}
622622
----
623623

624-
Now, the same query will return the coalesced value:
624+
Now, the same query returns the coalesced value:
625625

626626
[source, json, indent=0]
627627
----
@@ -639,7 +639,8 @@ This ensures consistent behavior between filtering and projecting fields with th
639639

640640
=== Set `addVersionPrefix` to true by default
641641

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:
642+
In version 7.0.0, the `addVersionPrefix` option is set to `true` by default.
643+
This means that all generated Cypher queries are automatically prefixed with the Cypher version:
643644

644645
[source, cypher, indent=0]
645646
----
@@ -648,9 +649,10 @@ CYPHER 5
648649
MATCH(this:Movie)
649650
----
650651

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.
652+
This ensures that the correct Cypher version is used when queries are executed in Neo4j.
653+
However, this change may be incompatible with older versions of Neo4j.
652654

653-
If you need to disable this behavior, you can set `cypherQueryOptions.addVersionPrefix` to `false` in the context:
655+
Set `cypherQueryOptions.addVersionPrefix` to `false` to disable this behavior:
654656

655657
[source, javascript, indent=0]
656658
----
@@ -677,11 +679,11 @@ await startStandaloneServer(server, {
677679
----
678680

679681

680-
=== Changed DateTime and Time value conversion behavior
682+
=== Changed `DateTime` and `Time` value conversion behavior
681683

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.
684+
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.
683685

684-
For example, if you have a date string in your GraphQL query:
686+
For example, if you have a date String in your GraphQL query:
685687

686688
[source, graphql, indent=0]
687689
----
@@ -702,14 +704,16 @@ WHERE this.releaseDate > datetime($param0)
702704
RETURN this { .title, .releaseDate } as this
703705
----
704706

705-
=== Mutation operations now follow the relationship direction defined in the `@relationship` argument queryDirection
707+
=== Mutation operations follow relationship directions
706708

707-
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.
709+
Mutation operations now respect the `queryDirection` value defined in the `@relationship` directive when matching existing relationships.
710+
This ensures consistent behavior between queries and mutations regarding how relationships are traversed.
708711

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.
712+
[NOTE]
713+
====
714+
When creating new relationships, the physical direction stored in the database is still determined by the `direction` argument.
715+
The change affects only how existing relationships are matched during mutation operations.
716+
====
713717

714718
For example, consider the following schema:
715719

@@ -726,13 +730,13 @@ type Person @node {
726730
}
727731
----
728732

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-
733+
With `queryDirection: UNDIRECTED`, mutations now traverse existing relationships in both directions when matching nodes, regardless of the base `direction` value.
734+
This is consistent with how queries work with the same directive configuration.
731735
Previously, mutations would always follow the explicit `direction` value when matching existing relationships, which could lead to inconsistent behavior between queries and mutations.
732736

733737
=== Moved `where` field in nested update operations
734738

735-
The `where` field for nested update operations has been removed, in favour of the `where` inside the nested update input.
739+
The `where` field for nested update operations has been removed in favor of the `where` inside the nested update input.
736740

737741
[cols="1,1"]
738742
|===
@@ -802,7 +806,8 @@ type Actor @node {
802806
}
803807
----
804808

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.
809+
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.
810+
This behavior was incorrect.
806811

807812
[source, graphql, indent=0]
808813
----
@@ -823,15 +828,55 @@ The fixed behavior in version 7.0.0:
823828
* `some`: Now correctly returns actors with at least one matching related node of any type in the union.
824829

825830
This change provides more logical and consistent results, but may affect existing queries that relied on the previous behavior.
826-
827831
This fix applies to both the new filter syntax and the deprecated filters (e.g., `actedIn_SINGLE` and `actedIn_SOME`).
828832

833+
=== List of nullable elements no longer supported
834+
835+
List of nullable elements such are no longer supported in types annotated with the `@node` directive.
836+
837+
The following type definition is no longer supported:
838+
839+
[source, graphql, indent=0]
840+
----
841+
type Actor @node {
842+
name: String
843+
pseudonyms: [String]!
844+
}
845+
----
846+
847+
This is due the fact that Neo4j does not support storing NULL values as part of a List.
848+
849+
=== Interfaces and unions cannot be implemented by a mix of `@nodes` and no `@nodes` types.
850+
851+
Interfaces and unions can only be implemented by types that are all annotated with the `@node` directive or none of them.
852+
853+
The following type definition is no longer supported:
854+
855+
[source, graphql, indent=0]
856+
----
857+
interface Production @node {
858+
title: String
859+
}
860+
type Movie @node implements Production {
861+
title: String
862+
}
863+
type Series implements Production {
864+
title: String
865+
}
866+
----
867+
868+
=== Relationship fields now require `@node` types
869+
870+
The `@relationship` directive can only be applied to fields whose types are annotated with the `@node` directive.
871+
872+
This also applies to fields defined as interfaces and unions where they must be implemented exclusively by `@node` types.
873+
829874

830875
== Deprecations
831876

832877
=== Deprecated mutations operators outside dedicated input
833878

834-
The following operators:
879+
The following operators are now deprecated:
835880

836881
- `_SET`
837882
- `_POP`
@@ -843,7 +888,7 @@ The following operators:
843888
- `_MULTIPLY`
844889
- `_DIVIDE`
845890

846-
are now deprecated. You should now use the dedicated input object versions:
891+
Use the dedicated input object versions instead:
847892

848893
[cols="1,1"]
849894
|===
@@ -893,7 +938,8 @@ const neoSchema = new Neo4jGraphQL({
893938

894939
=== Deprecated the _EQ filter syntax
895940

896-
The `_EQ` filter syntax is now deprecated. You should now use the dedicated input object versions:
941+
The `_EQ` filter syntax is now deprecated.
942+
Use the dedicated input object versions instead:
897943

898944
[cols="1,1"]
899945
|===
@@ -1019,7 +1065,8 @@ const neoSchema = new Neo4jGraphQL({
10191065

10201066
=== Deprecated relationship filters outside dedicated input
10211067

1022-
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.
1069+
Use the dedicated input object versions instead:
10231070

10241071
[cols="1,1"]
10251072
|===

0 commit comments

Comments
 (0)