jmfayard
01/25/2022, 10:56 AM@constraint
directive from ApolloGraphQL?
https://www.apollographql.com/blog/backend/validation/graphql-validation-using-directives/
type SignUpInput {
email: String! @constraint(format: "email", maxLength: 255)
password: String! @constraint(maxLength: 255)
}
Dariusz Kuc
01/25/2022, 1:17 PMjmfayard
01/25/2022, 2:55 PMConstraintDirective
and its ConstraintDirectiveWiring
which I registered in a `KotlinDirectiveWiringFactory`which itself is registered as hooks inside a SchemaGeneratorConfig
But still the directive does not appear in the generated GraphQL Schema.
I'm using ktor.
Is there maybe some magic that works only with Spring Boot?Dariusz Kuc
01/25/2022, 3:01 PMShane Myrick
01/25/2022, 11:12 PM@constraint
directive you are referring to is a schema or server side directive and is logic that is applied to the field on every client operation with out them specifying anything. The HTTP framework should not matter.
Also it is not from Apollo, it is from the GitHub user confuser
https://github.com/confuser/graphql-constraint-directivejmfayard
01/26/2022, 9:53 AMDariusz Kuc
01/26/2022, 4:42 PM