Skip to content

Consider allowing passthrough execution to resolver/mutation even if validator fails #69

Description

@oising

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions