GraphQLSwift / GraphQL

The Swift GraphQL implementation for macOS and Linux
MIT License
938 stars 72 forks source link

Variable and argument null vs undefined #90

Closed NeedleInAJayStack closed 3 years ago

NeedleInAJayStack commented 3 years ago

This is a follow-up to https://github.com/GraphQLSwift/GraphQL/pull/87. That PR added support to differentiate between explicitly providing the literal value null and implicitly not providing a value at all in input objects provided in the arguments. This merge request extends that functionality to input objects in variables and non-object arguments.

It also fixes a bug with not pre-validating argument inputs against their type (for example, passing null to a non-null parameter would passed null all the way into the resolver). It also removes force-casts to harden against server-wide fatal errors.

NeedleInAJayStack commented 3 years ago

Hey @paulofaria, since we've removed the ubuntu-16.04 action, could you remove it from the status checks as well? I think you can do so by going to Settings -> Branches -> Require status checks to pass before merging, and uncheck the Ubuntu 16.04 one.

paulofaria commented 3 years ago

@NeedleInAJayStack great work! Feel free to merge and tag!

NeedleInAJayStack commented 3 years ago

Awesome, thanks @paulofaria!