Closed mashaLutskevich2002 closed 7 months ago
@dimaMachina This rule don`t work ((
I added to schema.json random field like 'testField', in query I don't ask its. And I don't have an error no-unused-fields
please provide reproduction repo
@dimaMachina This is a corporate repository and only used VPN((
Do I understand the logic of the rule correctly? Could I be wrong?
here are docs https://the-guild.dev/graphql/eslint/rules/no-unused-fields here are tests https://github.com/dimaMachina/graphql-eslint/blob/master/packages/plugin/__tests__/no-unused-fields.spec.ts here are snapshots https://github.com/dimaMachina/graphql-eslint/blob/master/packages/plugin/__tests__/__snapshots__/no-unused-fields.spec.md here is original issue https://github.com/dimaMachina/graphql-eslint/issues/9
What does it mean this rule? I don’t understand (( it means that the schema has a field specified with the type. And in query (in graphql file) this field don’t use?
For example shema.json { "name": "container", "description": null, "isDeprecated": false, "deprecationReason": null, "args": [], "type": { "kind": "NON_NULL", "name": null, "ofType": { "kind": "SCALAR", "name": "Boolean", "ofType": null } } },
And in query (someQuery.graphql) field
container
dont`s use? Or am I misunderstanding?