Skip to content

Commit e53babf

Browse files
author
Guillaume Chau
committed
chore: v3.0.0-beta.27
1 parent 01e7920 commit e53babf

File tree

4 files changed

+24
-10
lines changed

4 files changed

+24
-10
lines changed

dist/vue-apollo.esm.js

+11-4
Original file line numberDiff line numberDiff line change
@@ -770,10 +770,17 @@ function (_SmartApollo) {
770770
}, {
771771
key: "executeApollo",
772772
value: function executeApollo(variables) {
773+
var variablesJson = JSON.stringify(variables);
774+
773775
if (this.sub) {
776+
if (variablesJson === this.previousVariablesJson) {
777+
return;
778+
}
779+
774780
this.sub.unsubscribe();
775-
} // Create observer
781+
}
776782

783+
this.previousVariablesJson = variablesJson; // Create observer
777784

778785
this.observer = this.vm.$apollo.watchQuery(this.generateApolloOptions(variables));
779786
this.startQuerySubscription();
@@ -841,7 +848,7 @@ function (_SmartApollo) {
841848
}
842849

843850
if (hasResultCallback) {
844-
this.options.result.call(this.vm, result);
851+
this.options.result.call(this.vm, result, this.key);
845852
}
846853
}
847854
}, {
@@ -1105,7 +1112,7 @@ function (_SmartApollo) {
11051112
_get(_getPrototypeOf(SmartSubscription.prototype), "nextResult", this).call(this, data);
11061113

11071114
if (typeof this.options.result === 'function') {
1108-
this.options.result.call(this.vm, data);
1115+
this.options.result.call(this.vm, data, this.key);
11091116
}
11101117
}
11111118
}]);
@@ -1918,7 +1925,7 @@ function install(Vue, options) {
19181925
}
19191926
ApolloProvider.install = install; // eslint-disable-next-line no-undef
19201927

1921-
ApolloProvider.version = "3.0.0-beta.26"; // Apollo provider
1928+
ApolloProvider.version = "3.0.0-beta.27"; // Apollo provider
19221929

19231930
var ApolloProvider$1 = ApolloProvider; // Components
19241931

0 commit comments

Comments
 (0)