nuxt-modules / apollo

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

Remove authType in nuxt.config #448

Closed alessioraggioli closed 1 year ago

alessioraggioli commented 1 year ago

Environment

"@nuxtjs/apollo": "^5.0.0-alpha.3"

Describe the bug

Hi, I tried to remove the default "Bearer" authType, reading the documentation here: https://apollo.nuxtjs.org/getting-started/configuration#authtype apollo: { clients: { default: { httpEndpoint: process.env.GRAPHQL_URL, authType: "", } } }

But seems not working, in the request headers i always get Authorization: Bearer

Expected behaviour

I need to remove the default bearer value, keep just the token.

Reproduction

No response

Additional context

No response

Logs

No response

Diizzayy commented 1 year ago

@alessioraggioli try setting authType to null

alessioraggioli commented 1 year ago

Tried

apollo: {
    clients: {
      default: {
        httpEndpoint: process.env.GRAPHQL_URL,
        authType: null,
      }
    }
  }

It set me the default "Bearer" in network auth..

alessioraggioli commented 1 year ago

@Diizzayy how can i get the fix? just reinstalling yarn package?

Diizzayy commented 1 year ago

how can i get the fix? just reinstalling yarn package?

@alessioraggioli Indeed, update to v5.0.0-alpha.4 for the fix to take effect.