-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
-
1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
For example, you can start off by editing the
'basic' example on Stackblitz.Please make sure the graphql-eslint version under
package.jsonmatches yours. -
2. A failing test has been provided
-
3. A local solution has been provided
-
4. A pull request is pending review
Describe the bug
The ignoreClientDirectives option for the known-directives rule only filters directives on Field and OperationDefinition nodes. It doesn't filter directives on FragmentDefinition, FragmentSpread, or InlineFragment nodes.
To Reproduce Steps to reproduce the behavior:
With config:
rules: {
'@graphql-eslint/known-directives': ['error', { ignoreClientDirectives: ['client'] }],
},# This works: ignored client directive on field
{
product {
name @client
}
}
# This fails: ignored client directive on fragment definition
fragment ProductFields on Product @client {
name
}Expected behavior
Client directives should be ignored on all executable definition nodes where they can legally appear.
Environment:
- OS:
@graphql-eslint/eslint-plugin: 4.4.0- Node.js:
Additional context