-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Labels
kind/bugBug :-(Bug :-(stage/5-alpha-release-testingThe pull request is merged, an alpha release is available, to be testedThe pull request is merged, an alpha release is available, to be tested
Description
Describe the bug
A query operation in one graphql SomeQuery.graphql defines a variable to be used by a fragment in another document SomeFragment.graphql fails linting and is told the variable is unused even though it is used by the fragment.
To Reproduce
Steps to reproduce the behavior:
- Checkout @beaucollins/graphql-lint-fragment-variables
npm install; npm run lint;
Example of failure: beaucollins/graphql-lint-fragment-variables@91fee89#annotation_1981886819
Expected behavior
This should not be an error because the variable is used according to @graphql-eslint/no-unused-variables:
A GraphQL operation is only valid if all variables defined by an operation are used, either directly or within a spread fragment.
Environment:
- OS: macOS 11.5.2
@graphql-eslint/[email protected]- NodeJS: v16.9.1
dotansimha
Metadata
Metadata
Assignees
Labels
kind/bugBug :-(Bug :-(stage/5-alpha-release-testingThe pull request is merged, an alpha release is available, to be testedThe pull request is merged, an alpha release is available, to be tested