Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions modules/ROOT/pages/migration/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -765,3 +765,43 @@ type Movie @node {
title: String! @private
}
----


=== Deprecated `where` field in `update` input

The `where` field for nested update operations has been deprecated to be moved within the `update` input field.
The `where` in its deprecated location is a no-op for all nested operations apart from `update`.

For example, the following mutation is using the deprecated syntax:

```graphql
mutation {
updateUsers(
where: { name: { eq: "Darrell" } }
update: {
posts: {
where: { node: { title: { eq: "Version 6 Release Notes" } } }
update: { node: { title: { set: "Version 6 Release Announcement" } } }
}
}
)
}
```

It should be modified to move the `where` inside the `update` operation:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It should be modified to move the `where` inside the `update` operation:
Modify the mutation to move the `where` inside the `update` operation:


```graphql
mutation {
updateUsers(
where: { name: { eq: "Darrell" } }
update: {
posts: {
update: {
where: { node: { title: { eq: "Version 6 Release Notes" } } }
node: { title: { set: "Version 6 Release Announcement" } }
}
}
}
)
}
```