Skip to content

GraphQL layer treats 0 as null #105

Description

@m-mitchell

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions