@@ -5,7 +5,7 @@ class SmartApollo {
55 type = null
66 vueApolloSpecialKeys = [ ]
77
8- constructor ( vm , key , options ) {
8+ constructor ( vm , key , options , autostart = true ) {
99 this . vm = vm
1010 this . key = key
1111 this . options = options
@@ -22,7 +22,9 @@ class SmartApollo {
2222 } ) )
2323 }
2424
25- this . autostart ( )
25+ if ( autostart ) {
26+ this . autostart ( )
27+ }
2628 }
2729
2830 autostart ( ) {
@@ -148,7 +150,7 @@ export class SmartQuery extends SmartApollo {
148150 'debounce' ,
149151 ]
150152
151- constructor ( vm , key , options ) {
153+ constructor ( vm , key , options , autostart = true ) {
152154 // Options object callback
153155 while ( typeof options === 'function' ) {
154156 options = options . call ( vm )
@@ -162,7 +164,7 @@ export class SmartQuery extends SmartApollo {
162164 }
163165 }
164166
165- super ( vm , key , options )
167+ super ( vm , key , options , autostart )
166168 }
167169
168170 stop ( ) {
@@ -307,13 +309,13 @@ export class SmartSubscription extends SmartApollo {
307309 'debounce' ,
308310 ]
309311
310- constructor ( vm , key , options ) {
312+ constructor ( vm , key , options , autostart = true ) {
311313 // Options object callback
312314 while ( typeof options === 'function' ) {
313315 options = options . call ( vm )
314316 }
315317
316- super ( vm , key , options )
318+ super ( vm , key , options , autostart )
317319 }
318320
319321 executeApollo ( variables ) {
0 commit comments