nuxt-modules / apollo

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

Remove authType in nuxt.config #448

Closed alessioraggioli closed 2 years ago

alessioraggioli commented 2 years 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 2 years ago

@alessioraggioli try setting authType to null

alessioraggioli commented 2 years ago

Tried

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

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

alessioraggioli commented 2 years ago

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

Diizzayy commented 2 years 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.