Skip to content

Is validation with JSR380 (or Spring validation) supported? #843

Discussion options

You must be logged in to vote

Solved! Turned out I needed to shift the annotations around a bit. This is the working solution:

@Component
@Validated
class MyAwesomeMutation : Mutation {
    fun myAwesomeMutation(@Valid widget: Widget) = widget
}

data class Widget(@get:Min(3) val id: Int)

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by smyrick
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #843 on September 03, 2020 21:50.