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

Fix set header to JSON earlier in GraphQL response #532

Merged
merged 1 commit into from
Feb 5, 2019

Conversation

Sonna
Copy link
Contributor

@Sonna Sonna commented Feb 5, 2019

Update the GraphQL handler to set the Response Header to JSON earlier for
error messages to be returned as JSON and not text/html.

Fixes #519

Notes:

  • Add checks for JSON Content-Type checks in decode bad queries tests

@Sonna Sonna requested a review from vektah February 5, 2019 23:39
@Sonna Sonna force-pushed the fix-missing-json-content-type branch from 6d9f59d to 8d8cdd5 Compare February 5, 2019 23:46
@Sonna Sonna changed the base branch from master to next February 5, 2019 23:46
Update the GraphQL handler to set the Response Header to JSON earlier for
error messages to be returned as JSON and not text/html.

Fixes #519

== Notes:
- Add checks for JSON Content-Type checks in decode bad queries tests
@Sonna Sonna force-pushed the fix-missing-json-content-type branch from 8d8cdd5 to b4c5a07 Compare February 5, 2019 23:47
@Sonna
Copy link
Contributor Author

Sonna commented Feb 5, 2019

Why do the CircleCI checks fail?

@Sonna Sonna merged commit 82ded32 into next Feb 5, 2019
@Sonna Sonna deleted the fix-missing-json-content-type branch February 6, 2019 01:55
@vektah vektah mentioned this pull request Mar 4, 2019
cgxxv pushed a commit to cgxxv/gqlgen that referenced this pull request Mar 25, 2022
…ent-type

Fix set header to JSON earlier in GraphQL response

Update the GraphQL handler to set the Response Header to JSON earlier for
error messages to be returned as JSON and not text/html.

Fixes 99designs#519

## Notes:
- Add checks for JSON Content-Type checks in decode bad queries tests
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.

2 participants