Closed
Description
Currently, QueryByExampleDataFetcher
creates the example Object from the full arguments map. For queries with a single argument that is a GraphQL input type, this means the example object isn't the direct equivalent of the GraphQL input type, but rather a wrapper around it with the GraphQL input type as its only field.
We can improve this by detecting that a query has a single argument that is a GraphQL input type, and have the QueryByExampleDataFetcher
use that argument as its source rather than the full arguments map.
The same applies to QuerydslDataFetcher
, which builds a predicate relative to the full map, but for such single argument queries, it might make more sense to nest and be relative to that argument.