Moved initial queries to created hook
This commit is contained in:
@@ -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
@@ -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": {
|
||||
|
||||
Reference in New Issue
Block a user