Skip to content

Null literal is unsupported #427

Closed
Closed

Description

@dh94

currently in graphql-java we can't distinguish between provided nulls and unprovided values,
even worse - the query just fails
see the official graphql pr here
graphql/graphql-spec#83

Activity

  1. andimarek commented on May 13, 2017

    @andimarek
    Member

    comment by @bbakerman:

    We could extend the grammar to allow a NullValue to be captured in syntax eg:

    field (arg : null)
    The trick then would be how best to tell DataFetchers that the value is null literal versus not present

  2. ieugen commented on May 13, 2017

    @ieugen

    @andimarek : java.util.Optional could do that, no ?

  3. added a commit that references this issue on May 13, 2017
  4. added this to the milestone on May 14, 2017
  5. bbakerman commented on May 14, 2017

    @bbakerman
    Member

    java.util.Optional would indeed do it

    but we would have to change the current behaviour from

    T argValue = environment.getArgument("arg")
    

    to

    Optional argValue = environment.getArgument("arg")

    This would break all existing code. Its a tricky one

  6. ieugen commented on May 15, 2017

    @ieugen

    As they say: If you wish to make an omelet... release version 4 :).

  7. andimarek commented on May 15, 2017

    @andimarek
    Member

    see #434

  8. added 3 commits that reference this issue on May 22, 2017
  9. added 3 commits that reference this issue on May 24, 2017
  10. added 3 commits that reference this issue on May 27, 2017
  11. bbakerman commented on May 28, 2017

    @bbakerman
    Member

    Implemented via PR #452

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions