Skip to content

Explicitly setting field with a default value to null sets it to default value instead of null #3708

@piotrblasiak

Description

@piotrblasiak

If you explicitly set a variable to null, and that variable has a default value like this query:

myQuery(deleted: Boolean = false)

and you call

myQuery(deleted: null)

environmeng.getArgument("deleted") still returns false, instead of null.

  1. Is this a bug, or have I misunderstood the graphql spec?
  2. Is there any way to make it return null instead?

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