nuxt-modules / apollo

Nuxt.js module to use Vue-Apollo. The Apollo integration for GraphQL.
https://apollo.nuxtjs.org
MIT License
929 stars 194 forks source link

Allow for a more granular auto-import config #587

Open Eazash opened 6 months ago

Eazash commented 6 months ago

This PR adds the ability to selectively disable auto-imports for the gql function or vue-apollo composables.

export default defineNuxtConfig({
// ...
  apollo: {
    autoImports: {
      gql: false,
      'vue-apollo': true
    },
})

The motivation is to allow for custom autoimports for the gql function from other sources. One particular use case is when looking to add an autoimport from the autogenerated tag function provided by graphql-codegen that is typesafe

netlify[bot] commented 6 months ago

Deploy Preview for apollo-module canceled.

Name Link
Latest commit 3dc06a1c5b27e701db969a877a7e6b16874d4f8a
Latest deploy log https://app.netlify.com/sites/apollo-module/deploys/659271c04fac170008fdef08