apolloProvider.prefetchAll is not a function

bjunc
114
bjunc
commented a year ago

I'm getting the error above, which seems to stem from:

<ApolloProvider>.provide() is deprecated. Use the 'apolloProvider' option instead with the provider object directly.

Which seems to originate from within the plugin file in the module, implying that the internal plugin code goes against the internal module code. This is all internal to the @nuxtjs/apollo module. I'm using v3.0.7.

0
bjunc
114
bjunc
commented a year ago

Okay, it looks like I might have figured it out. @nuxtjs/[email protected] has vue-apollo "^3.0.0-beta.14" as a dependency (note the "^"). Yesterday v3.0.0-beta.20 of vue-apollo was released with a breaking change. My guess is the easiest/fastest solution is to update this module with an explicit dependency on the previous (non-breaking) vue-apollo (v3.0.0-beta.16).

As a hotfix until a patch is released, devs can override the vue-apollo dependency using resolutions:

package.json

{
  "dependencies": {
    ...
  },
  "resolutions": {
    "vue-apollo": "3.0.0-beta.16"
  },
}

https://github.com/Akryum/vue-apollo/releases/tag/v3.0.0-beta.20

Note, this really should be a bug report, but I personally think requiring a repo is too onerous.

2
morizyun
0
morizyun
commented a year ago

Thank you. It is helpful info!

0
Informations
Question โ€ข Unresolved
#c134 - Created a year ago