From 31f790d524c089687134e2af9f48ffd7ee8c5d98 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Mon, 7 May 2018 17:34:39 +0200 Subject: [PATCH] fix: ApolloMutation done event: added result arg --- src/components/ApolloMutation.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/ApolloMutation.js b/src/components/ApolloMutation.js index 88e374c..28a7dcf 100644 --- a/src/components/ApolloMutation.js +++ b/src/components/ApolloMutation.js @@ -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)