From b53aa354ad4c00700e331ed56999300ddf6e1b63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bel=C3=A9n=20Curcio?= Date: Tue, 2 Oct 2018 13:22:22 -0300 Subject: [PATCH] Adding optimisticresponse for deleteCommentReaction --- .../stream/mutations/DeleteCommentReactionMutation.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/client/stream/mutations/DeleteCommentReactionMutation.ts b/src/core/client/stream/mutations/DeleteCommentReactionMutation.ts index ea1a0acde..9e032f296 100644 --- a/src/core/client/stream/mutations/DeleteCommentReactionMutation.ts +++ b/src/core/client/stream/mutations/DeleteCommentReactionMutation.ts @@ -31,6 +31,14 @@ function commit(environment: Environment, input: CreateCommentReactionInput) { clientMutationId: clientMutationId.toString(), }, }, + optimisticResponse: { + deleteCommentReaction: { + comment: { + id: input.commentID, + }, + clientMutationId: clientMutationId.toString(), + }, + } as any, // TODO: (cvle) generated types should contain one for the optimistic response. }); }