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

GraphQL App returns 400 #133

Open
sebastiandev opened this issue Jan 13, 2021 · 2 comments
Open

GraphQL App returns 400 #133

sebastiandev opened this issue Jan 13, 2021 · 2 comments

Comments

@sebastiandev
Copy link

GraphQL Apps should always return 200, even when there are errors. That is because a resolver might have failed but others might have been completed successfully so there will be data in the response. The 400 is reserved for graphql parsing errors.

This line here is causing tartiflette-asgi to return 400 if errors is populated. Removing it should bring the expected behavior.

Is there any reason why this convention is not followed?

@florimondmanca
Copy link
Contributor

Hey,

Not really, I think! You seem to be more familiar with the details of the GraphQL protocol than I was at the time, so if there are changes you think are worth considering I'd be glad to review any pull request towards that. 😊

@sebastiandev
Copy link
Author

Gotcha, here it is

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

No branches or pull requests

2 participants