fix: ApolloMutation done event: added result arg

This commit is contained in:
Guillaume Chau
2018-05-07 17:34:39 +02:00
parent 83eadce4f3
commit 31f790d524
+2 -2
View File
@@ -43,7 +43,7 @@ export default {
this.loading = true
this.error = null
try {
await this.$apollo.mutate({
const result = await this.$apollo.mutate({
mutation: this.mutation,
variables: this.variables,
optimisticResponse: this.optimisticResponse,
@@ -51,7 +51,7 @@ export default {
refetchQueries: this.refetchQueries,
...options,
})
this.$emit('done')
this.$emit('done', result)
} catch (e) {
this.error = e
this.$emit('error', e)