diff --git a/lib/vue-plugin.js b/lib/vue-plugin.js index 8f78962..c930c90 100644 --- a/lib/vue-plugin.js +++ b/lib/vue-plugin.js @@ -162,7 +162,9 @@ function prepare() { this._apolloSubscriptions = []; this.$apollo = new DollarApollo(this); +} +function launch() { let apollo = this.$options.apollo; if (apollo) { @@ -194,6 +196,8 @@ module.exports = { // Vue 2.x beforeCreate: prepare, + created: launch, + destroyed: function() { this._apolloSubscriptions.forEach((sub) => { sub.unsubscribe(); diff --git a/package.json b/package.json index c3cc322..74702e8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "vue-apollo", - "version": "1.0.0-beta7-1", + "version": "1.0.0-beta7-2", "description": "Vue apollo integration", "main": "index.js", "scripts": {