There are two ways of validating your graphql input types, via Directives or manually validating the input type in your resolver. In this episode we focus on the more old-school approach and put the JSR-303 bean validation annotations on our pojos. In a following tutorial, we will look at graphql-java-extended-validation which will allow us to remove all java bean validation annotations, and instead place the annotations directly on the schema. Pretty cool.
As graphql-java-extended-validation is still under active development and first stable release was 2 days ago (17 September 2020) I will provide tutorials on both validation methods .
There are always multiple ways of solving problems and normally neither are wrong. So its good to list all options. In the end, we pick what we find the most beneficial and efficient :)
In the next video we look at graphql-java-extended-validation and how we can validation with graphql schema directives instead of java annotations. That way we keep our pojos clean.
Thanks!
Philip
Spring Boot GraphQL: https://github.com/graphql-java-kicks...
Java GraphQL Extended Validation: https://github.com/graphql-java/graph...
На этой странице сайта вы можете посмотреть видео онлайн Spring Boot GraphQL Tutorial #18 - Input Validation (Method 1 - Bean) длительностью часов минут секунд в хорошем качестве, которое загрузил пользователь Philip Starritt 19 Сентябрь 2020, поделитесь ссылкой с друзьями и знакомыми, на youtube это видео уже посмотрели 8,293 раз и оно понравилось 53 зрителям. Приятного просмотра!