Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Update headers are empty check on INJECT_HEADERS #916

Merged
merged 2 commits into from
Jan 14, 2019

Conversation

zhammer
Copy link
Contributor

@zhammer zhammer commented Dec 18, 2018

An empty headers dict currently is not treated as having 'no headers to inject'
Discussed in: #893

Fixes #893 (at least in the case where headers are empty).

Changes proposed in this pull request:

  • Fix logic in checking if headers are empty in INJECT_HEADERS

An empty headers dict currently is not treated as having 'no headers to inject'
Discussed in: graphql#893
@CLAassistant
Copy link

CLAassistant commented Dec 18, 2018

CLA assistant check
All committers have signed the CLA.

@zhammer
Copy link
Contributor Author

zhammer commented Dec 18, 2018

headers can be any in props:
https://github.com/prisma/graphql-playground/blob/master/packages/graphql-playground-react/src/components/Playground.tsx#L85

but are typed as strings in the injectheaders prop:
https://github.com/prisma/graphql-playground/blob/master/packages/graphql-playground-react/src/components/Playground.tsx#L102

and (as far as i can tell in my local use) are sent as an object, which when empty is still considered to have headers to inject

@huv1k
Copy link
Collaborator

huv1k commented Jan 14, 2019

@zhammer Thanks for your PR! It will be in the next version of playground.

@huv1k huv1k merged commit 7c243de into graphql:master Jan 14, 2019
@zhammer zhammer deleted the patch-1 branch January 14, 2019 20:29
cgxxv pushed a commit to cgxxv/graphql-playground that referenced this pull request Mar 25, 2022
* Update headers are empty check on INJECT_HEADERS

An empty headers dict currently is not treated as having 'no headers to inject'
Discussed in: graphql#893

* Accidentally changed line
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants