Closed peterc1731 closed 1 month ago
Thanks for submitting - I'll take a look tonight :)
@peterc1731 Thanks for addressing this fix! I've seen the significance of this issue, and I've found that this solution works accurately. Is there any reason to hold back from merging this pull request?
@peterc1731 are you still interested in addressing @jonnydgreen comment? @bglgwyng maybe would you like to take over?
@peterc1731 are you still interested in addressing @jonnydgreen comment?
Apologies, completely forgot to get back to this one! I will take a look today.
@mcollina thinking a semver patch release for this one?
yes
Fixes https://github.com/mercurius-js/validation/issues/57
When inferring types from the schema, the library does not consider nullability for objects or arrays. The test that validates nullable input types ("should support nullable input type arguments") was only validating string type inputs, when adding validation for a few more input types as I've done in this PR, that test fails.
I've applied a fix for the issue as well as updating the tests, I'm not sure if the approach is the best one, but it works and its a simple change with low impact on the rest of the behaviour.