require-selections
does not report issues on FragmentSpread
s within GraphQLUnionType
#2318
Closed
4 tasks done
Issue workflow progress
Progress of the issue based on the
Contributor Workflow
Describe the bug
require-selections
handles onlyInlineFragment
spreads withGraphQLUnionType
s, despite namedFragmentSpread
s being valid GraphQL that should receive the same treatment.https://github.com/dimaMachina/graphql-eslint/blob/58467e65f0283f5ad7a7ca8a3f0301b7669b4416/packages/plugin/src/rules/require-selections.ts#L172-L182
To Reproduce
Steps to reproduce the behavior:
The failing test in the linked PR provides the best example for the bug (see commit that adds that test), but a simplified schema is reproduced below:
Expected behavior
An error should be reported for
FragmentSpread
just like it is forInlineFragment
s withinGraphQLUnionType
s.Environment:
@graphql-eslint/eslint-plugin
: 4.0.0The text was updated successfully, but these errors were encountered: