From 6175c4f81633a4359a81bcdc6484334873cf5b73 Mon Sep 17 00:00:00 2001 From: Darrell Warde Date: Wed, 26 Mar 2025 16:21:23 +0000 Subject: [PATCH 1/2] Add migration section for deprecated update where --- modules/ROOT/pages/migration/index.adoc | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/modules/ROOT/pages/migration/index.adoc b/modules/ROOT/pages/migration/index.adoc index 6fcd4748..0b091dd2 100644 --- a/modules/ROOT/pages/migration/index.adoc +++ b/modules/ROOT/pages/migration/index.adoc @@ -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: + +```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" } } + } + } + } + ) +} +``` \ No newline at end of file From b432e9ff296e2a8258e614ed140860010d4a9dc8 Mon Sep 17 00:00:00 2001 From: Darrell Warde <8117355+darrellwarde@users.noreply.github.com> Date: Wed, 9 Apr 2025 15:32:30 +0100 Subject: [PATCH 2/2] Apply suggestions from code review Co-authored-by: Richard Sill <156673635+rsill-neo4j@users.noreply.github.com> --- modules/ROOT/pages/migration/index.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/ROOT/pages/migration/index.adoc b/modules/ROOT/pages/migration/index.adoc index 0b091dd2..e05c82b5 100644 --- a/modules/ROOT/pages/migration/index.adoc +++ b/modules/ROOT/pages/migration/index.adoc @@ -769,7 +769,7 @@ type Movie @node { === 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` field for nested update operations has been deprecated to be moved inside 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: @@ -788,7 +788,7 @@ mutation { } ``` -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 {