Skip to content

Avoid need for wrapper around single argument GraphQL input types with Querydsl and Query By Example #216

Closed
@rstoyanchev

Description

@rstoyanchev

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.

Metadata

Metadata

Assignees

Labels

in: dataIssues related to working with datatype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions