Add DataFetchingEnvironment parameter to main query resolverSee original GitHub issue
Is 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
It is currently generated in all resolvers interfaces, but not for the root resolvers like
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.
- Created 3 years ago
- 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 email@example.com wrote:
Yes, we could definitely make the unification. Thanks for finding this. But how will this automatically solve the issue?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kobylynskyi/graphql-java-codegen/issues/61#issuecomment-611590797, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAOTDUBTEGS355D2JUHUO7TRLXSPLANCNFSM4MEEEM3Q .