From e2a58ffac4a57db2c6a5180a51a12b4e4aff7ad9 Mon Sep 17 00:00:00 2001 From: Suzette McCanny Date: Wed, 18 Oct 2023 15:16:06 -0700 Subject: [PATCH] Fixes for the mutation section of the tutorial (#4479) Summary: A few variable/fragment names needed to be altered to get a successfully updating app. Pull Request resolved: https://github.com/facebook/relay/pull/4479 Reviewed By: tyao1 Differential Revision: D50419721 Pulled By: alunyov fbshipit-source-id: a4b243f0acd9e7f88b710920b7633298fb091df2 --- website/docs/tutorial/mutations-updates.md | 4 ++-- .../version-v15.0.0/tutorial/mutations-updates.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/website/docs/tutorial/mutations-updates.md b/website/docs/tutorial/mutations-updates.md index d4c950c1d3fe1..068e0c31f768c 100644 --- a/website/docs/tutorial/mutations-updates.md +++ b/website/docs/tutorial/mutations-updates.md @@ -300,7 +300,7 @@ function StoryLikeButton({story}) { commitMutation({ variables: { id: data.id, - doesViewerLike: newDoesLike, + doesLike: newDoesLike, }, // change optimisticUpdater: store => { @@ -570,7 +570,7 @@ export default function StoryCommentsComposer({story}: Props) { // change const connectionID = ConnectionHandler.getConnectionID( data.id, - 'StoryCommentsSectionFragment_comments', + 'StoryCommentsSection_comments', ); // end-change commitMutation({ diff --git a/website/versioned_docs/version-v15.0.0/tutorial/mutations-updates.md b/website/versioned_docs/version-v15.0.0/tutorial/mutations-updates.md index e712dc35a19ae..7ef5dbf3848ab 100644 --- a/website/versioned_docs/version-v15.0.0/tutorial/mutations-updates.md +++ b/website/versioned_docs/version-v15.0.0/tutorial/mutations-updates.md @@ -197,7 +197,7 @@ function StoryLikeButton({story}) { commitMutation({ variables: { id: data.id, - doesViewerLike: !data.doesViewerLike, + doesLike: !data.doesViewerLike, }, }) // end-change @@ -570,7 +570,7 @@ export default function StoryCommentsComposer({story}: Props) { // change const connectionID = ConnectionHandler.getConnectionID( data.id, - 'StoryCommentsSectionFragment_comments', + 'StoryCommentsSection_comments', ); // end-change commitMutation({