leangen / graphql-spqr

Build a GraphQL service in seconds
Apache License 2.0
1.09k stars 181 forks source link

Use the configured valueMapperFactory at JsonDefaultValueProvider #408

Open TuomasKiviaho opened 3 years ago

TuomasKiviaho commented 3 years ago

The JsonDefaultValueProvider uses Defaults::valueMapperFactory instead of the provided valueMapperFactory.

Would it possible to provide the valueMapperFactory to AnnotatedArgumentBuilder via ArgumentBuilderParams (via ResolverBuilderParams via OperationRegistry) so that one could have an alternative default value provider constructor that would receive both the value mapper factory and the currently receiver global environment. That way one could utilize the proper value mapper based on the type.