Use case: Sometimes you may want to treat the validation as a partial failure, and allow the mutation/resolver to execute anyway, so a payload can be returned. Might I suggest using an extension method on IResolverContext to allow the method to see the result(s) for each input type, and make its own decisions on how to proceed.
There is a related issue with Strawberry Shake - if the payload for the mutation is non-nullable, fairybread will cause a null to flow through and causes a null ref exception in the deserializer, if validation fails.
I don't mind doing the work, but just wanted your advice on this. Returning an error/errors and a payload doesn't seem to be against the graphql spec.
Use case: Sometimes you may want to treat the validation as a partial failure, and allow the mutation/resolver to execute anyway, so a payload can be returned. Might I suggest using an extension method on
IResolverContextto allow the method to see the result(s) for each input type, and make its own decisions on how to proceed.There is a related issue with Strawberry Shake - if the payload for the mutation is non-nullable, fairybread will cause a null to flow through and causes a null ref exception in the deserializer, if validation fails.
I don't mind doing the work, but just wanted your advice on this. Returning an error/errors and a payload doesn't seem to be against the graphql spec.