Skip to content

Better way to specify fieldsWithResolvers #296

@vinaybedre

Description

@vinaybedre

Is your feature request related to a problem? Please describe.
As and when the graphql specification gets bigger(tens of them), especially, with queries/types with field level resolvers, it becomes difficult to manage field level resolver with codegen
If I need to specify a field level resolver, I need to add it to either fieldsWithResolvers or negate it with fieldsWithoutResolvers in config. See https://github.com/kobylynskyi/graphql-java-codegen/blob/master/docs/codegen-options.md

Describe the solution you'd like
Have a way to determine from graphql spec to decide about field level resolvers, by a custom directive which is a valid GraphQL way of extending things.
With this approach, we can keep the field level resolver flags next to the specification and can be completely removed from config.

Describe alternatives you've considered
None

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions