Skip to content

New validation rule: providing the explicit value 'null' to non-null argument is invalid#2038

Merged
bbakerman merged 1 commit into
graphql-java:masterfrom
dugenkui03:bug_fix_for_non‐null_argument
Oct 21, 2020

Hidden character warning

The head ref may contain hidden characters: "bug_fix_for_non\u2010null_argument"
Merged

New validation rule: providing the explicit value 'null' to non-null argument is invalid#2038
bbakerman merged 1 commit into
graphql-java:masterfrom
dugenkui03:bug_fix_for_non‐null_argument

Conversation

@dugenkui03

Copy link
Copy Markdown
Contributor

required Arguments rule

Providing the explicit value null is also not valid since required arguments always have a non‐null type.

demo:

fragment missingRequiredArg on Arguments {
  nonNullBooleanArgField(nonNullBooleanArg: null)
}

@dugenkui03 dugenkui03 force-pushed the bug_fix_for_non‐null_argument branch from d54bd65 to ec1fc5a Compare September 14, 2020 12:46
@dugenkui03 dugenkui03 changed the title providing the explicit value 'null' is not valid providing the explicit value 'null' to non-null argument is not valid Sep 14, 2020

@bbakerman bbakerman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this

@bbakerman bbakerman added this to the 16.0 milestone Sep 15, 2020
@dugenkui03 dugenkui03 changed the title providing the explicit value 'null' to non-null argument is not valid New validation rule: providing the explicit value 'null' to non-null argument is invalid Sep 18, 2020

@bbakerman bbakerman left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR

@bbakerman bbakerman merged commit 49bbbeb into graphql-java:master Oct 21, 2020
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

Successfully merging this pull request may close these issues.

2 participants