From 4ef96c2e4d5b1fd38b47433cd87da4d3f52c93d6 Mon Sep 17 00:00:00 2001 From: Guillaume Chau Date: Thu, 2 May 2019 18:22:24 +0200 Subject: [PATCH] fix(ApolloQuery): prefetch prop to false freezing server --- src/mixin.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mixin.js b/src/mixin.js index 4149d0b..db2e038 100644 --- a/src/mixin.js +++ b/src/mixin.js @@ -1,4 +1,4 @@ -import { Globals } from '../lib/utils' +import { Globals, reapply } from '../lib/utils' function hasProperty (holder, key) { return typeof holder !== 'undefined' && Object.prototype.hasOwnProperty.call(holder, key) @@ -91,6 +91,7 @@ function launch () { if (key.charAt(0) !== '$') { let options = apollo[key] const smart = this.$apollo.addSmartQuery(key, options) + options = reapply(options, this) if (options.prefetch !== false && apollo.$prefetch !== false && !smart.skip) { this.$_apolloPromises.push(smart.firstRun) }