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
type Query {
shows(titleFilter: String @NotBlank): [Show]
}
@DgsComponent
classValidationConfig {
@DgsRuntimeWiring
funaddValidationDirective(builder:RuntimeWiring.Builder): RuntimeWiring.Builder {
val validationRules =ValidationRules.newValidationRules()
.onValidationErrorStrategy(OnValidationErrorStrategy.RETURN_NULL)
.build()
val wiring =ValidationSchemaWiring(validationRules) // SchemaDirectiveWiringreturn builder.directiveWiring(wiring)
}
}
2022-05-22 17:57:10.242 WARN 60792 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'dgsQueryExecutor' defined in class path resource [com/netflix/graphql/dgs/autoconfig/DgsAutoConfiguration.class]: Unsatisfied dependency expressed through method 'dgsQueryExecutor' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'schema' defined in class path resource [com/netflix/graphql/dgs/autoconfig/DgsAutoConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [graphql.schema.GraphQLSchema]: Factory method 'schema' threw exception; nested exception is SchemaProblem{errors=['titleFilter' [@2:11] tried to use an undeclared directive 'NotBlank']}
2022-05-22 17:57:10.244 INFO 60792 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-05-22 17:57:10.254 INFO 60792 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-05-22 17:57:10.271 ERROR 60792 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
There are problems with the GraphQL Schema:
* 'titleFilter' [@2:11] tried to use an undeclared directive 'NotBlank'
The text was updated successfully, but these errors were encountered:
Can dgs be integrated with implementation("com.graphql-java:graphql-java-extended-validation:2022-04-27T05-15-47-b3d9bc3") ?
and how to do it?
The text was updated successfully, but these errors were encountered: