dimaMachina / graphql-eslint

ESLint parser, plugin and set rules for GraphQL (for schema and operations). Easily customizable with custom rules. Integrates with IDEs and modern GraphQL tools.
https://the-guild.dev/graphql/eslint
MIT License
795 stars 103 forks source link

Add ignore list to `no-unused-fields` rule #2280

Open maciesielka opened 5 months ago

maciesielka commented 5 months ago

Is your feature request related to a problem? Please describe.

The no-unused-fields rule is a great way to avoid bloat in my schema, but I'm willing to accept that bloat in some cases. For example, I'm not worried if I don't request all the relay pagination fields for every connection exposed in my schema. Currently, though, that's a dealbreaker preventing me from using this rule.

Describe the solution you'd like

Any configuration option to provide a list of fields that are allowed to be unused. I'm not particularly wedded to any format for that configuration, but ~I'll provide a PR shortly that showcases one option.~ see PR here with one possible option.

Additional context

n/a