You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In GraphQLite version 6, this PR (thecodingmachine/graphqlite#435), provides support for the new SchemaFactory::setInputTypeValidator. With this new implementation, Input annotated objects can have validation triggered. This entirely removes the need for controller level calls in every method, and removes the possibility of a dev forgetting to do so.
This becomes a centralized place for all validation on all input types. Using it in conjunction with Symfony's annotation based validation is an obvious choice, among other possible custom needs.
This bundle would improve if it leveraged that as a default and fell back to manually calling validation when InputType objects are instantiated through a factory. Or, if someone would like to submit a PR to GraphQLite to extend the InputTypeValidatorInterface to support Factory constructed InputTypes as well, that'd be great.
In GraphQLite version 6, this PR (thecodingmachine/graphqlite#435), provides support for the new
SchemaFactory::setInputTypeValidator
. With this new implementation,Input
annotated objects can have validation triggered. This entirely removes the need for controller level calls in every method, and removes the possibility of a dev forgetting to do so.This becomes a centralized place for all validation on all input types. Using it in conjunction with Symfony's annotation based validation is an obvious choice, among other possible custom needs.
This bundle would improve if it leveraged that as a default and fell back to manually calling validation when InputType objects are instantiated through a factory. Or, if someone would like to submit a PR to GraphQLite to extend the
InputTypeValidatorInterface
to supportFactory
constructed InputTypes as well, that'd be great.Docs: https://graphqlite.thecodingmachine.io/docs/validation#custom-inputtype-validation
The text was updated successfully, but these errors were encountered: