Describe the bug
It looks like variables are coerced twice during an execution using graphql-java 16.2, once in execute and once in validateFieldsAndArguments. This breaks e.g. enums with non-default names.
Variables are first coerced here, then added to the execution context.
In FieldValidationSupport, the QueryTraverser is initialized with those variables from the execution context and coerces them again here.
To Reproduce
If you have an enum value defined like this
GraphQLEnumType.newEnum()
.name("MyEnum")
.description("My enum with all lowercase names.")
.values(
MyEnum.values().map {
GraphQLEnumValueDefinition.newEnumValueDefinition()
.name(it.getLowerCaseName())
.value(it)
.build()
}
).build()
the first coercion works correctly, but the second one fails.