Correct optimitic updates

This commit is contained in:
Belén Curcio committed 2018-10-04 15:52:25 -03:00
1 parent 5bf4c66b40
commit 44b589d04f
2 files changed
+10 -2

No files matched your search

@@ -48,7 +48,11 @@ function commit(environment: Environment, input: CreateCommentReactionInput) {
myActionPresence: {
reaction: true,
},
actionCounts: currentCount + 1,
actionCounts: {
reaction: {
total: currentCount + 1,
},
},
},
clientMutationId: (clientMutationId++).toString(),
},
@@ -42,7 +42,11 @@ function commit(environment: Environment, input: CreateCommentReactionInput) {
myActionPresence: {
reaction: false,
},
actionCounts: currentCount - 1,
actionCounts: {
reaction: {
total: currentCount - 1,
},
},
},
clientMutationId: clientMutationId.toString(),
},