Skip to content

Commit

Permalink
Fixes for the mutation section of the tutorial (#4479)
Browse files Browse the repository at this point in the history
Summary:
A few variable/fragment names needed to be altered to get a successfully updating app.

Pull Request resolved: #4479

Reviewed By: tyao1

Differential Revision: D50419721

Pulled By: alunyov

fbshipit-source-id: a4b243f0acd9e7f88b710920b7633298fb091df2
  • Loading branch information
rainandbare authored and facebook-github-bot committed Oct 18, 2023
1 parent 3e1681f commit e2a58ff
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions website/docs/tutorial/mutations-updates.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ function StoryLikeButton({story}) {
commitMutation({
variables: {
id: data.id,
doesViewerLike: newDoesLike,
doesLike: newDoesLike,
},
// change
optimisticUpdater: store => {
Expand Down Expand Up @@ -570,7 +570,7 @@ export default function StoryCommentsComposer({story}: Props) {
// change
const connectionID = ConnectionHandler.getConnectionID(
data.id,
'StoryCommentsSectionFragment_comments',
'StoryCommentsSection_comments',
);
// end-change
commitMutation({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ function StoryLikeButton({story}) {
commitMutation({
variables: {
id: data.id,
doesViewerLike: !data.doesViewerLike,
doesLike: !data.doesViewerLike,
},
})
// end-change
Expand Down Expand Up @@ -570,7 +570,7 @@ export default function StoryCommentsComposer({story}: Props) {
// change
const connectionID = ConnectionHandler.getConnectionID(
data.id,
'StoryCommentsSectionFragment_comments',
'StoryCommentsSection_comments',
);
// end-change
commitMutation({
Expand Down

0 comments on commit e2a58ff

Please sign in to comment.