Skip to content

Commit 540d9dc

Browse files
committed
Moved initial queries to created hook
1 parent dc814b9 commit 540d9dc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/vue-plugin.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,9 @@ function prepare() {
162162
this._apolloSubscriptions = [];
163163

164164
this.$apollo = new DollarApollo(this);
165+
}
165166

167+
function launch() {
166168
let apollo = this.$options.apollo;
167169

168170
if (apollo) {
@@ -194,6 +196,8 @@ module.exports = {
194196
// Vue 2.x
195197
beforeCreate: prepare,
196198

199+
created: launch,
200+
197201
destroyed: function() {
198202
this._apolloSubscriptions.forEach((sub) => {
199203
sub.unsubscribe();

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-apollo",
3-
"version": "1.0.0-beta7-1",
3+
"version": "1.0.0-beta7-2",
44
"description": "Vue apollo integration",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)