Issue workflow progress
Progress of the issue based on the
Contributor Workflow
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
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
1. The issue provides a reproduction available on GitHub, Stackblitz or CodeSandbox
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
ignoreClientDirectivesoption for theknown-directivesrule only filters directives onFieldandOperationDefinitionnodes. It doesn't filter directives onFragmentDefinition,FragmentSpread, orInlineFragmentnodes.To Reproduce Steps to reproduce the behavior:
With config:
Expected behavior
Client directives should be ignored on all executable definition nodes where they can legally appear.
Environment:
@graphql-eslint/eslint-plugin: 4.4.0Additional context