Skip to content

fix(graphql_analyze): also flag duplicate fields within extensions#9869

Merged
Netail merged 3 commits intomainfrom
fix/extensions
Apr 9, 2026
Merged

fix(graphql_analyze): also flag duplicate fields within extensions#9869
Netail merged 3 commits intomainfrom
fix/extensions

Conversation

@Netail
Copy link
Copy Markdown
Member

@Netail Netail commented Apr 8, 2026

Summary

Flag duplicate fields within graphql type extensions, interface extensions & input extensions. Not cross definitions & extensions yet, opened a ticket for that, but is blocked by the schema service

Saw parsing issue in another rule's snapshot & added Any* in front of union

Test Plan

Unit tests

Docs

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 8, 2026

🦋 Changeset detected

Latest commit: 8753a03

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 13 packages
Name Type
@biomejs/biome Patch
@biomejs/cli-win32-x64 Patch
@biomejs/cli-win32-arm64 Patch
@biomejs/cli-darwin-x64 Patch
@biomejs/cli-darwin-arm64 Patch
@biomejs/cli-linux-x64 Patch
@biomejs/cli-linux-arm64 Patch
@biomejs/cli-linux-x64-musl Patch
@biomejs/cli-linux-arm64-musl Patch
@biomejs/wasm-web Patch
@biomejs/wasm-bundler Patch
@biomejs/wasm-nodejs Patch
@biomejs/backend-jsonrpc Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Netail Netail marked this pull request as draft April 8, 2026 18:57
@github-actions github-actions bot added the A-Linter Area: linter label Apr 8, 2026
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 8, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks
⏩ 247 skipped benchmarks1


Comparing fix/extensions (8753a03) with main (e8cad58)

Open in CodSpeed

Footnotes

  1. 247 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: e057b901-df82-4452-b21b-3cd0864e9e49

📥 Commits

Reviewing files that changed from the base of the PR and between d8bba5d and 8753a03.

📒 Files selected for processing (1)
  • .changeset/tender-owls-arrive.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .changeset/tender-owls-arrive.md

Walkthrough

The GraphQL linter rules were broadened to consider type, interface and input extensions when checking for duplicate field names. The noDuplicateFieldDefinitionNames rule’s query type was renamed from NoDuplicateFieldDefinitionNamesQuery to AnyNoDuplicateFieldDefinitionNamesQuery and now includes Graphql*TypeExtension variants; NoRootTypeQuery was similarly renamed to AnyNoRootTypeQuery. Tests were expanded to cover duplicate and valid cases that use extend blocks.

Suggested reviewers

  • siketyan
🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: flagging duplicate fields within GraphQL extensions, which directly matches the primary objective of the pull request.
Description check ✅ Passed The description is related to the changeset, explaining the scope of duplicate field detection in extensions and mentioning the renaming of union types for clarity.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/extensions

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/tender-owls-arrive.md:
- Line 5: Update the changeset description to include a user-facing link to the
rule documentation instead of plain code formatting: reference the rule name
"noDuplicateFieldDefinitionNames" as a markdown link to its docs (e.g.
[noDuplicateFieldDefinitionNames](https://your-docs-site/.../noDuplicateFieldDefinitionNames)),
and if this is a bug fix also reference the issue with a link (e.g. Fixed
[`#4444`](...)); ensure the sentence reads like user-facing copy rather than
inline code and replace the current backticked rule name with the linked form.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: f1599cad-3f9d-4639-91be-d7d5bf1f96f9

📥 Commits

Reviewing files that changed from the base of the PR and between e8cad58 and ff38abd.

⛔ Files ignored due to path filters (2)
  • crates/biome_graphql_analyze/tests/specs/nursery/noDuplicateFieldDefinitionNames/invalid.graphql.snap is excluded by !**/*.snap and included by **
  • crates/biome_graphql_analyze/tests/specs/nursery/noDuplicateFieldDefinitionNames/valid.graphql.snap is excluded by !**/*.snap and included by **
📒 Files selected for processing (5)
  • .changeset/tender-owls-arrive.md
  • crates/biome_graphql_analyze/src/lint/nursery/no_duplicate_field_definition_names.rs
  • crates/biome_graphql_analyze/src/lint/nursery/no_root_type.rs
  • crates/biome_graphql_analyze/tests/specs/nursery/noDuplicateFieldDefinitionNames/invalid.graphql
  • crates/biome_graphql_analyze/tests/specs/nursery/noDuplicateFieldDefinitionNames/valid.graphql

Comment thread .changeset/tender-owls-arrive.md Outdated
@Netail Netail marked this pull request as ready for review April 8, 2026 19:11
@Netail Netail requested a review from dyc3 April 8, 2026 21:14
@Netail Netail merged commit 78bce77 into main Apr 9, 2026
18 checks passed
@Netail Netail deleted the fix/extensions branch April 9, 2026 07:48
@github-actions github-actions bot mentioned this pull request Apr 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants