File tree Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Expand file tree Collapse file tree 3 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ const apolloProvider = new VueApollo({
3333 console .log (' Global error handler' )
3434 console .error (error)
3535 },
36+ // Globally turn off prefetch ssr
37+ prefetch: Boolean
3638})
3739```
3840
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export class ApolloProvider {
88 this . defaultOptions = options . defaultOptions
99 this . watchLoading = options . watchLoading
1010 this . errorHandler = options . errorHandler
11+ this . prefetch = options . prefetch
1112
1213 this . prefetchQueries = [ ]
1314 }
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ function launch () {
9393 const smart = this . $apollo . addSmartQuery ( key , options )
9494 if ( this . $isServer ) {
9595 options = reapply ( options , this )
96- if ( options . prefetch !== false && apollo . $prefetch !== false && ! smart . skip ) {
96+ if ( apolloProvider . prefetch !== false && options . prefetch !== false && apollo . $prefetch !== false && ! smart . skip ) {
9797 this . $_apolloPromises . push ( smart . firstRun )
9898 }
9999 }
You can’t perform that action at this time.
0 commit comments