graphql-aspnet icon indicating copy to clipboard operation
graphql-aspnet copied to clipboard

Confusing Message for Uncoercible List Variable Value

Open kevin-carroll opened this issue 2 years ago • 0 comments

When a supplied value for a list variable is not coercible into the required type specified by the operation the error message can be confusing at times:

image

While the variable is correctly trapped and the query failed, the message indicates that a value of null was not valid. This is because the list resolver, when it fails to coerce a value, returns null. The list value resolver should throw an UnresolvedValueException like the scalar resolvers do and supply the appropriate information indicating the reason for failure.

kevin-carroll avatar Aug 07 '22 18:08 kevin-carroll