apollographql / apollo-rs

Spec compliant GraphQL Tools in Rust.
Apache License 2.0
566 stars 45 forks source link

fix(compiler): InputValueDefinition::is_required() returns false if there is a default value #798

Closed goto-bus-stop closed 8 months ago

goto-bus-stop commented 8 months ago

Now argument.is_required() == true only if the type is non-null and there is no default value, meaning a value must be provided when it's used. This is how the spec describes required arguments.

This seems more useful as the previous implementation can already be achieved by checking argument.ty.is_non_null().

It's kind of a fix, kind of just a change, kind of breaking...

goto-bus-stop commented 8 months ago

I didn't find any!