Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

WIP: allow the user to disable HTTP 500 if the response contains only errors #451

Closed
wants to merge 6 commits into from

Conversation

julkwiec
Copy link

@julkwiec julkwiec commented Sep 17, 2018

By default, the express-graphql library changes the HTTP response code to 500 if the response.data property is falsy.
As a back-end developer, I want to be able to decide whether to respond with HTTP 200 or HTTP 500, even if the response contains no data, just errors.

…if the response contains only errors, no data.
@facebook-github-bot
Copy link

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed.

If you have received this in error or have any questions, please contact us at [email protected]. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 99.375% when pulling f88872c on julkwiec:custom-http-status-code into 750cfd5 on graphql:master.

@lanzanka
Copy link

@IvanGoncharov Hi! Could you review this pull request? Do you know what the estimated date of the next release is?

@nvieirarafael-sensedia
Copy link

This option would be great!
I recently update my project to use latest version of the lib and these 500 status code on queries without data are giving me integration problems with clients that already use api.

@julkwiec
Copy link
Author

Fixed merge conflicts.

Also, #471 seems like a better solution ;)

@julkwiec julkwiec closed this Aug 21, 2019
@julkwiec julkwiec deleted the custom-http-status-code branch August 21, 2019 10:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants