Add DataFetchingEnvironment parameter to main query resolver
See original GitHub issueIs your feature request related to a problem? Please describe.
When using GraphQL Java Tools, the main Query resolver, like other resolvers, can take an optional DataFetchingEnvironment
parameter.
It is currently generated in all resolvers interfaces, but not for the root resolvers like Query
.
Describe the solution you’d like
It’d be nice to provide this DataFetchingEnvironment
argument to the query resolver’s methods.
If we need backwards compatibility, we could use a config parameter to add or not the DataFetchingEnvironment argument in the generated interfaces.
Describe alternatives you’ve considered
There is no other way currently than to stop implementing the Query
interface, which is a pain because changes to the schema don’t make the compilation fail.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:8 (8 by maintainers)
Top GitHub Comments
Yes, I’ll try to work on it tomorrow
By automatically I meant that if the code is not duplicated, adding the DataFetchingEnvironment in one place solves the other one.
On Thu, Apr 9, 2020, 17:27 Bogdan Kobylynskyi notifications@github.com wrote: