From f5aa8f685dc6de2d9f93f9db4fa013c41eac28e4 Mon Sep 17 00:00:00 2001 From: Adrien Crivelli Date: Thu, 19 Sep 2024 16:26:24 +0200 Subject: [PATCH] Coherent code and explanation Fixes #1805 --- website/src/pages/docs/data/mutations.mdx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/website/src/pages/docs/data/mutations.mdx b/website/src/pages/docs/data/mutations.mdx index 873b42051..1a37c5e72 100644 --- a/website/src/pages/docs/data/mutations.mdx +++ b/website/src/pages/docs/data/mutations.mdx @@ -218,7 +218,7 @@ class PostComponent { constructor(private readonly apollo: Apollo) {} - upvote({ postId, title }) { + changePostTitle({ postId, title }) { this.apollo .mutate({ mutation: CHANGE_POST_TITLE, @@ -238,9 +238,9 @@ class PostComponent { ``` For the example above, it is easy to construct an optimistic response, since we know the shape of -the new comment and can approximately predict the created date. The optimistic response doesn't have -to be exactly correct because it will always will be replaced with the real result from the server, -but it should be close enough to make users feel like there is no delay. +the new post and can predict the new title. The optimistic response doesn't have to be exactly +correct because it will always be replaced with the real result from the server, but it should be +close enough to make users feel like there is no delay. As this comment is *new* and not visible in the UI before the mutation, it won't appear