Moved initial queries to created hook

This commit is contained in:
Guillaume Chau
2016-09-21 10:55:50 +02:00
parent dc814b9869
commit 540d9dc93b
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -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();
+1 -1
View File
@@ -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": {