We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
naming-convention
__typename
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 editng the 'basic' example on Stackblitz.
Please make sure the graphql-eslint version under package.json matches yours.
package.json
2. A failing test has been provided
3. A local solution has been provided
4. A pull request is pending review
Describe the bug
This is a follow-up to #664.
While querying __typename is allowed now, assigning an alias to that field still causes a linting error if allowLeadingUnderscore is false:
allowLeadingUnderscore
false
error Leading underscores are not allowed @graphql-eslint/naming-convention
To Reproduce Steps to reproduce the behavior:
Define a query like this:
const GET_USER = ` query { user { type: __typename name } } `;
And it fails validation for the aliased __typename field. This works fine when we're not using an alias:
const GET_USER = ` query { user { __typename name } } `;
Expected behavior
Querying the __typename field should also be allowed if we're aliasing the field name.
Environment:
Ubuntu 22.04.4 LTS
@graphql-eslint/eslint-plugin
v20.12.2
Additional context
The text was updated successfully, but these errors were encountered:
No branches or pull requests
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
This is a follow-up to #664.
While querying
__typename
is allowed now, assigning an alias to that field still causes a linting error ifallowLeadingUnderscore
isfalse
:To Reproduce Steps to reproduce the behavior:
Define a query like this:
And it fails validation for the aliased
__typename
field.This works fine when we're not using an alias:
Expected behavior
Querying the
__typename
field should also be allowed if we're aliasing the field name.Environment:
Ubuntu 22.04.4 LTS
@graphql-eslint/eslint-plugin
: v3.20.1`v20.12.2
Additional context
The text was updated successfully, but these errors were encountered: