Correct optimitic updates

This commit is contained in:
Belén Curcio
2018-10-04 15:52:25 -03:00
parent 5bf4c66b40
commit 44b589d04f
2 changed files with 10 additions and 2 deletions
@@ -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(),
},