Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[Help] SetHeaders in TypeScript #203

Closed
thakkaryash94 opened this issue Sep 1, 2020 · 2 comments · Fixed by #202
Closed

[Help] SetHeaders in TypeScript #203

thakkaryash94 opened this issue Sep 1, 2020 · 2 comments · Fixed by #202
Labels

Comments

@thakkaryash94
Copy link

thakkaryash94 commented Sep 1, 2020

I tried to set headers using multiple ways but when I print the graphQLClient, it shows an empty object. Below are the ways I tried.

attempt 1:

const headers = new Headers()
headers.append('authorization', `Bearer ${token}`)
graphQLClient.setHeaders(headers)

attempt 2:

graphQLClient.setHeaders(new Headers({
  'authorization': `Bearer ${token}`
}))

but not working.

@thakkaryash94
Copy link
Author

@vecerek @jasonkuhrt Thank you so much for the fix. I would love to contribute and fix by myself instead of asking for help but I am new in TypeScript so currently, I am in learning mode.

When can we expect the new release with the fix?

@jasonkuhrt
Copy link
Member

Canary is out now. I will try to cut a stable tonight.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants