Skip to content
Discussion options

You must be logged in to vote

I found the issue, and I will leave this discussion for anyone else experiencing this issue in the future.

I forgot to add the content-type header.

With this codegen file it works

schema:
  - https://graphql.contentful.com/content/v1/spaces/<id>:
      headers:
        Authorization: 'Bearer <token>'
documents: './src/**/*.graphql'
generates:
  ./src/queries/generated.tsx:
    plugins:
      - typescript
      - typescript-operations
      - typescript-react-query
    config:
      exposeFetcher: true
      exposeQueryKeys: true
      fetcher:
        endpoint: 'https://graphql.contentful.com/content/v1/spaces/<id>'
        fetchParams:
          headers:
            Content-Type: 'applic…

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@Urigo
Comment options

Urigo Jan 2, 2022
Collaborator

@sandervspl
Comment options

@Urigo
Comment options

Urigo Jan 6, 2022
Collaborator

Answer selected by sandervspl
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants