Skip to content

Commit a431e08

Browse files
authored
Merge pull request #250 from neo4j/migration/deprecated-update-where
Add migration section for deprecated update where
2 parents 18edfb3 + b432e9f commit a431e08

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

modules/ROOT/pages/migration/index.adoc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,3 +765,43 @@ type Movie @node {
765765
title: String! @private
766766
}
767767
----
768+
769+
770+
=== Deprecated `where` field in `update` input
771+
772+
The `where` field for nested update operations has been deprecated to be moved inside the `update` input field.
773+
The `where` in its deprecated location is a no-op for all nested operations apart from `update`.
774+
775+
For example, the following mutation is using the deprecated syntax:
776+
777+
```graphql
778+
mutation {
779+
updateUsers(
780+
where: { name: { eq: "Darrell" } }
781+
update: {
782+
posts: {
783+
where: { node: { title: { eq: "Version 6 Release Notes" } } }
784+
update: { node: { title: { set: "Version 6 Release Announcement" } } }
785+
}
786+
}
787+
)
788+
}
789+
```
790+
791+
Modify the mutation to move the `where` inside the `update` operation:
792+
793+
```graphql
794+
mutation {
795+
updateUsers(
796+
where: { name: { eq: "Darrell" } }
797+
update: {
798+
posts: {
799+
update: {
800+
where: { node: { title: { eq: "Version 6 Release Notes" } } }
801+
node: { title: { set: "Version 6 Release Announcement" } }
802+
}
803+
}
804+
}
805+
)
806+
}
807+
```

0 commit comments

Comments
 (0)