From dff5fb95827961a3a3caebc0b2982cc4e55da4b9 Mon Sep 17 00:00:00 2001 From: Yordis Prieto Date: Mon, 18 Jun 2018 06:02:47 -0400 Subject: [PATCH] Move times outside of the result data structure (#308) closes #307 --- src/components/ApolloQuery.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/components/ApolloQuery.js b/src/components/ApolloQuery.js index 1667219..664fb5c 100644 --- a/src/components/ApolloQuery.js +++ b/src/components/ApolloQuery.js @@ -71,8 +71,8 @@ export default { loading: false, networkStatus: 7, error: null, - times: 0, }, + times: 0, } }, @@ -138,9 +138,10 @@ export default { loading, error, networkStatus, - times: ++this.$_times, } + this.times = ++this.$_times; + this.$emit('result', this.result) }, error (error) { @@ -169,6 +170,7 @@ export default { render (h) { let result = this.$scopedSlots.default({ result: this.result, + times: this.times, query: this.$apollo.queries.query, isLoading: this.$apolloData.loading, gqlError: this.result && this.result.error && this.result.error.gqlError,