vuejs / apollo

🚀 Apollo/GraphQL integration for VueJS
http://apollo.vuejs.org
MIT License
6.02k stars 522 forks source link

Issue with CompositionApi #1312

Closed stephane303 closed 2 years ago

stephane303 commented 2 years ago

Describe the bug After upgrading to vue-demi "^0.12.1",

I have "[vue-composition-api] must call Vue.use(VueCompositionAPI) before using any function." all over the place. I tried to solve with https://stackoverflow.com/questions/69846717/vue2-and-composition-api-cannot-import-store-error-vue-composition-api-must, but with no success.

This upgrade was triggered by the upgrade "@vue/apollo-composable", from "^4.0.0-alpha.15" to "^4.0.0-alpha.16"

My current setup: "@vue/apollo-composable": "^4.0.0-alpha.15", vue-demi "^0.11.4"

is not having any issues

Also published here : https://github.com/vueuse/vue-demi/issues/127

stephane303 commented 2 years ago

Finally I used the Option 1 of https://stackoverflow.com/questions/69846717/vue2-and-composition-api-cannot-import-store-error-vue-composition-api-must, everywhere I had used ref outside a setup function, and so far everything is ok with the latest version.