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 layer treats 0 as null #105

Open
m-mitchell opened this issue Oct 1, 2019 · 0 comments
Open

GraphQL layer treats 0 as null #105

m-mitchell opened this issue Oct 1, 2019 · 0 comments

Comments

@m-mitchell
Copy link

If you pass an explicitly-set 0 value through the graphQL layer, it gets silently dropped because 0 is falsy in JS and the checks in the graphQL layer aren't very specific. I have a nullable integer field where 0 and null mean two different things, but when I send a 0, it gets converted to null.

You can see the issue in this method: https://github.com/jagql/framework/blob/master/lib/graphQl/resolvers.js#L66

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

1 participant