Pending comment blur

This commit is contained in:
Chi Vinh Le
2018-09-07 18:18:39 +02:00
parent 88e44b2baf
commit 5010e342df
16 changed files with 1380 additions and 1236 deletions
@@ -72,6 +72,7 @@ function commit(
) {
const me = getMe(environment)!;
const currentDate = new Date().toISOString();
const id = uuidGenerator();
return commitMutationPromiseNormalized<MutationTypes>(environment, {
mutation,
variables: {
@@ -85,7 +86,7 @@ function commit(
edge: {
cursor: currentDate,
node: {
id: uuidGenerator(),
id,
createdAt: currentDate,
author: {
id: me.id,
@@ -97,6 +98,9 @@ function commit(
clientMutationId: (clientMutationId++).toString(),
},
} as any, // TODO: (cvle) generated types should contain one for the optimistic response.
optimisticUpdater: store => {
store.get(id)!.setValue(true, "pending");
},
configs: getConfig(input),
});
}