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: docs/modules/ROOT/pages/guides/v2-migration/mutations.adoc
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
[[v2-migration-mutations]]
2
2
= Mutations
3
3
4
-
The most broadly affected area of functionality by the 2.0.0 upgrade are the nested operations of Mutations, to faciliate the mutation of and filtering on relationship properties.
4
+
The most broadly affected area of functionality by the 2.0.0 upgrade are the nested operations of Mutations, to facilitate the mutation of and filtering on relationship properties.
5
5
6
6
The examples in this section will be based off the following type definitions:
Additionally, the requires argument also validates the required selection set against your type definitions.
191
+
Therefore, as there is no field called `someFieldThatDoesNotExist`, an error would be thrown on startup if you tried to use the following type definitions:
=== `plural` argument removed from `@node` and replaced with `@plural`
135
204
@@ -406,76 +475,49 @@ type query {
406
475
407
476
Additionally, escaping strings is no longer needed.
408
477
409
-
=== `@customResolver` changes
478
+
=== Mandatory `@relationshipProperties`
410
479
411
-
In version 4.0.0, it is now possible to require non-scalar fields. This means it is also possible to require fields on related type.
412
-
To make this possible, the `requires` argument now accept a graphql selection set instead of a list of strings.
480
+
Upcoming changes to interfaces require us to distinguish between interfaces that are used to specify relationship properties, and others. Therefore, the `@relationshipProperties` directive is now required on all relationship property interfaces.
481
+
If it is not included, an error will be thrown.
413
482
414
-
Therefore, the following type definitions:
483
+
As a result, in version 4.0.0, the following type definitions are invalid:
actors: [Person!]! @relationship(type: "ACTED_IN", direction: IN, properties: "ActedIn")
463
514
}
464
-
----
465
-
466
-
Additionally, the requires argument also validates the required selection set against your type definitions.
467
-
Therefore, as there is no field called `someFieldThatDoesNotExist`, an error would be thrown on startup if you tried to use the following type definitions:
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/type-definitions/basics.adoc
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,8 @@ Note there is a directive on each "end" of the relationship in this case, but it
39
39
40
40
=== Relationship properties
41
41
42
-
In order to add relationship properties to a relationship, you need to add a new type to your type definitions, but this time it will be of type `interface`. For example, for your "ACTED_IN" relationship, add a property "roles":
42
+
In order to add relationship properties to a relationship, you need to add a new type to your type definitions, but this time it will be of type `interface`. This interface must be decorated with the `@relationshipProperties` directive.
43
+
For example, for your "ACTED_IN" relationship, add a property "roles":
0 commit comments