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

Field errors #102

Closed
gabrielf opened this issue Aug 3, 2015 · 3 comments
Closed

Field errors #102

gabrielf opened this issue Aug 3, 2015 · 3 comments

Comments

@gabrielf
Copy link
Contributor

gabrielf commented Aug 3, 2015

From the discussion of #44.
According to the spec on scalars under "Result Coercion":

If the server encounters some value that cannot be reasonably coerced 
to an Int, then it must raise a field error.

However it seems most examples and tests simply return null instead. What's correct?

@leebyron
Copy link
Contributor

leebyron commented Aug 4, 2015

They raise a field error, but the error handling semantics (http://facebook.github.io/graphql/#sec-Error-handling) explain:

If an error occurs when resolving a field, it should be treated as though the field returned null, and an error must be added to the “errors” list in the response.

@leebyron
Copy link
Contributor

leebyron commented Aug 4, 2015

Though that clause needs some explanation for non-nullable typed fields. I'll keep this open to handle that.

@leebyron leebyron reopened this Aug 11, 2015
@leebyron
Copy link
Contributor

leebyron commented Apr 7, 2016

@leebyron leebyron closed this as completed Apr 7, 2016
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