Skip to content

Add migration section for deprecated update where #250

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 10, 2025
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" } }
}
}
}
)
}
```