graphql-java-tools
graphql-java-tools copied to clipboard
Custom directive default parameter not loaded
I created this custom directive inside a spring boot project
directive @Email(message : String = "{path} must be a valid email") on ARGUMENT_DEFINITION | INPUT_FIELD_DEFINITION
and when I use it inside a query, this way:
{
updatePersonEmail(email: String @Email) {
}
}
then the default argument values of Email are not passed inside the directive. It's almost like directive declared and the one on the argument are not mapped together. Is this a wished behaviour, or is there something more to do?
I have the same issue with a 'ON FIELD_DEFINITION' directive.
At wiring time, the SchemaDirectiveWiringEnvironment<GraphQLFieldDefinition> does not seem to contain the values of arguments for which we specified defaults.
(And I also couldn't find a workaround way to access them)