Repository navigation
Conversation
…ention naming-convention resolved a root field such as a Query field to its root selector alone, so an option like "FieldDefinition[parent.name.value=Query]" with only forbiddenPrefixes silently stopped the general "FieldDefinition" casing rule from running on that type. @graphql-eslint registers one listener per option key, so both rules apply to such a field, the less specific one first. Check a root field against its base rule and then its root rule, reporting each violation. Replace the test that expected the root rule to override the base rule, which @graphql-eslint 3.13.1 and 3.20.1 do not do. Assisted-By: claude-sonnet 5.5 via opencode
Contributor
|
Link to code coverage report (posted by coverbot 🤖) |
malept
marked this pull request as ready for review
October 24, 2026 00:33
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
naming-conventionchecked a field on a root type against its root-type selector alone. With the usual config, whereFieldDefinitionrequires camelCase andFieldDefinition[parent.name.value=Query]forbids agetprefix,Queryfields were never checked for casing.@graphql-eslintregisters one listener per option key, so both rules apply to such a field.Check a root field against its base rule, then its root rule, and report each violation.
Jira ID
DT-5640
Notes for your reviewers
I ran
@graphql-eslint/eslint-plugin3.13.1 and 3.20.1 to confirm both rules fire. That contradicts the existing test "Query field selector overrides the general FieldDefinition rule", so it is replaced with one that expects the base rule's violation.Rejected review findings and intentional non-goals
These were raised in earlier reviews and deliberately left as they are. Do not raise them again unless the reasoning below no longer holds.
Rejected findings
Intentional behavior
@graphql-eslintreports each rule separately and does not deduplicate.extend type Queryare checked once, under the base type.gqlparserhas already merged them into the base definition.