Vue-apollo: The documentation indicates that vue-apollo is compatible with Vue 3

Created on 27 Sep 2020  路  5Comments  路  Source: vuejs/vue-apollo

Describe the bug
https://github.com/vuejs/vue-apollo/blob/dev/packages/docs/src/guide/README.md#introduction
https://apollo.vuejs.org/guide/

This library integrates apollo in your Vue components with declarative queries. Compatible with Vue 2.0+ and 3.0+.

The doc indicates that vue-apollo is compatible with Vue 3 but, unless I'm missing something, it is most definitely not compatible yet.

Most helpful comment

If you really need to use Apollo Client 3 with Vue 3, then for now your only option is to use apollo-client itself with Vue 3.

I wrote a how to using Vite Vue3 ApolloClient 3 if it helps... https://dev.to/aisone/getting-vite-vue-3-and-apollo-client-3-running-51bp

All 5 comments

If you really need to use Apollo Client 3 with Vue 3, then for now your only option is to use apollo-client itself with Vue 3.

I wrote a how to using Vite Vue3 ApolloClient 3 if it helps... https://dev.to/aisone/getting-vite-vue-3-and-apollo-client-3-running-51bp

It's being worked on at https://v4.apollo.vuejs.org/
I'll update the docs

Three months and still no real news, @Akryum. The docs are still not very helpful and I know a lot of people are still waiting for this...

Three months and still no real news, @Akryum. The docs are still not very helpful and I know a lot of people are still waiting for this...

I had a quick look in the source awhile ago, one note is that the query return data structure is different, breaking change, this one is not easy as apps built with this will use that structure and need to change.

Also to handle both Vue 2 and 3 will need some effort.

If it is urgent for you, just use the apollo-client without this plug-in, or keep to the last working version, bearing in mind the technical decay as time moves on.

Yeah, but releasing v4 of vue-apollo, that included breaking changes that are not compatible with vue2, would actually make more sense than doing basically nothing. Installing vue-apollo@next installs v3.0.0-alpha3 instead of v4.x.x so there's no help there. I don't really mind if it's still in alpha and still has some issues, that's to be expected with major changes like these. But I'm now basically just waiting for this to continue migrating my current vue2 project to vue3 since vue-apollo is a central part of that. Granted, I would have to wait anyway, but I could at least start preparing for the changes needed for vue-apollo v4...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chadwtaylor picture chadwtaylor  路  3Comments

jsrkstr picture jsrkstr  路  3Comments

ais-one picture ais-one  路  4Comments

beeplin picture beeplin  路  4Comments

sadhakbj picture sadhakbj  路  3Comments