dotansimha / graphql-code-generator-community

MIT License
119 stars 157 forks source link

Vue 3 support for TypeScript Vue Apollo #115

Open bartenra opened 3 years ago

bartenra commented 3 years ago

Is your feature request related to a problem? Please describe.

Currently, the TypeScript Vue Apollo imports @vue/composition-api which is a plugin to make the new Vue 3 composition API backward-compatible with Vue 2.

Describe the solution you'd like

This import is no longer needed with Vue 3, as the Composition API is now part of Vue itself.

I would like to see support for Vue 3, maybe with a new configuration parameter. I'm not sure if other changes besides changing this import are needed.

Additional context

Vue Appollo itself is being reworked for Vue 3: https://v4.apollo.vuejs.org/

ardatan commented 3 years ago

Would you create a draft PR for this change and we can help you?

bartenra commented 3 years ago

We've decided to go with urql due to Apollo's lacking Vue 3 support at the moment.

lukadriel7 commented 3 years ago

We've decided to go with urql due to Apollo's lacking Vue 3 support at the moment.

Hello, have you been able to generate composition functions using urql and this library ?

dotansimha commented 3 years ago

Does this help? https://github.com/dotansimha/graphql-code-generator/pull/5825

lukadriel7 commented 3 years ago

actually, it works with vue 3.1 now. just have to precise the import vueCompositionApiImportFrom: vue