@@ -770,10 +770,17 @@ function (_SmartApollo) {
770
770
} , {
771
771
key : "executeApollo" ,
772
772
value : function executeApollo ( variables ) {
773
+ var variablesJson = JSON . stringify ( variables ) ;
774
+
773
775
if ( this . sub ) {
776
+ if ( variablesJson === this . previousVariablesJson ) {
777
+ return ;
778
+ }
779
+
774
780
this . sub . unsubscribe ( ) ;
775
- } // Create observer
781
+ }
776
782
783
+ this . previousVariablesJson = variablesJson ; // Create observer
777
784
778
785
this . observer = this . vm . $apollo . watchQuery ( this . generateApolloOptions ( variables ) ) ;
779
786
this . startQuerySubscription ( ) ;
@@ -841,7 +848,7 @@ function (_SmartApollo) {
841
848
}
842
849
843
850
if ( hasResultCallback ) {
844
- this . options . result . call ( this . vm , result ) ;
851
+ this . options . result . call ( this . vm , result , this . key ) ;
845
852
}
846
853
}
847
854
} , {
@@ -1105,7 +1112,7 @@ function (_SmartApollo) {
1105
1112
_get ( _getPrototypeOf ( SmartSubscription . prototype ) , "nextResult" , this ) . call ( this , data ) ;
1106
1113
1107
1114
if ( typeof this . options . result === 'function' ) {
1108
- this . options . result . call ( this . vm , data ) ;
1115
+ this . options . result . call ( this . vm , data , this . key ) ;
1109
1116
}
1110
1117
}
1111
1118
} ] ) ;
@@ -1918,7 +1925,7 @@ function install(Vue, options) {
1918
1925
}
1919
1926
ApolloProvider . install = install ; // eslint-disable-next-line no-undef
1920
1927
1921
- ApolloProvider . version = "3.0.0-beta.26 " ; // Apollo provider
1928
+ ApolloProvider . version = "3.0.0-beta.27 " ; // Apollo provider
1922
1929
1923
1930
var ApolloProvider$1 = ApolloProvider ; // Components
1924
1931
0 commit comments