-
Notifications
You must be signed in to change notification settings - Fork 317
Support @Validated
on method parameter
#571
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
We call standard bean validation to validate all the method parameters, and it does look like that requires Are you trying to specify validation groups? We do check for I think we could enhance our validation support to detect method parameters with |
@Validated
on method parameter
Thank you for your advice.
Yes, I would like to use validation groups in graphGL.
Thank you for the useful information.
It would be great if your can support this. Thanks. |
Perform the check for whether validation for a HandlerMethod is needed earlier and only once rather than in the constructor of DataFetcherHandlerMethod. Make the validation helper passed to DataFetcherHandlerMethod stateful, so that validation groups are also determined once on startup. See gh-571
Hi.
I'm trying to add validation with GraphQL.
But "@validated" not working with "GraphQlController".
(I tried "GraphQlController ×
@Valid
" and "RestController ×@Validated
" and they worked.)Below is the source code.
If there are any missing settings, please kindly advise.
Thanks.
■Query
■Query variables
■schema.graphqls
■AccountCondition
■GraphQLController × @validated → Validation not works.
■GraphQLController × @Valid→ Validation works.
■RestController × @validated → Validation works.
The text was updated successfully, but these errors were encountered: