fairybread
fairybread copied to clipboard
Input validation for HotChocolate
Closes #85
``` System.MissingMethodException: Method not found: 'HotChocolate.NameString HotChocolate.Types.Descriptors.Definitions.DefinitionBase.get_Name()'. at void FairyBread.ValidationMiddlewareInjector.OnBeforeCompleteType(ITypeCompletionContext completionContext, DefinitionBase definition, IDictionary contextData) at void HotChocolate.Configuration.AggregateTypeInterceptor.OnBeforeCompleteType(ITypeCompletionContext completionContext, DefinitionBase definition, IDictionary contextData) at void HotChocolate.Types.TypeSystemObjectBase.OnBeforeCompleteType(ITypeCompletionContext context, DefinitionBase definition, IDictionary...
Added support for MutationConventions. Must use "[Error(typeof(ValidationException))]" on mutations with enabled conventions. At the current time it is necessary to overwrite the DefaultValidationErrorsHandler to support errors apart from the "ValidationException"...
Currently there seems to be no support for the [Mutation Conventions](https://github.com/ChilliCream/hotchocolate/tree/main/src/HotChocolate/Core/src/Types.Mutations) as described [here](https://chillicream.com/docs/hotchocolate/defining-a-schema/mutations) in 9.0.0-rc.1. I think I identified the following issues: - Validators are not applied to parameters...
I'm not sure if the method of renaming/obsoleting is correct. Please let me know. Closes #82.
I _don't_ (😉) love the use of contractions in type/variable names. What do you think about alternatives like: `DontValidateAttribute` -> `DisableValidationAttribute` -> f.e. `[DisableValidation]` `DontValidateImplicitlyAttribute` -> `DisableImplicitValidationAttribute` -> f.e. `[DisableImplicitValidation]`...
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...
Got a report from Oisín Grehan and Nacer Dergal in Slack of a scenario where they weren't seeing the validator run. Turns out they had an array arg where the...
Goals: 1. Expose FluentValidation rules via schema 2. Accessibility - support pulling validation copy from resource files globalization (i18n) Stretch goals: 1. Support/execute + expose DataAnnotation attributes