Skip to content

feat(graphql): add project operation index service#9672

Closed
raashish1601 wants to merge 2 commits intobiomejs:mainfrom
raashish1601:contributor-05-8807-project-graphql-index
Closed

feat(graphql): add project operation index service#9672
raashish1601 wants to merge 2 commits intobiomejs:mainfrom
raashish1601:contributor-05-8807-project-graphql-index

Conversation

@raashish1601
Copy link
Copy Markdown

Summary

  • add a GraphQL project index service that callers can populate with cross-file operation names
  • thread GraphQL analyzer services through a new analyze_with_services entrypoint while preserving the existing default API
  • make noDuplicateGraphqlOperationName consume the project index and add focused tests for cross-file duplicates

Testing

  • cargo test -p biome_graphql_analyze --test quick_test -j 1
    • blocked on this worker: the clone initially had missing tracked workspace paths from an interrupted checkout, and after repairing those Cargo still failed with os error 112 / Windows PDB linker failures because C: ran out of disk space

Closes #8807

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Mar 29, 2026

⚠️ No Changeset found

Latest commit: e20f2c7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@github-actions github-actions bot added the A-Linter Area: linter label Mar 29, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Mar 29, 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: 8fe9034d-efa2-461a-b962-29190b86984e

📥 Commits

Reviewing files that changed from the base of the PR and between b2daece and e20f2c7.

📒 Files selected for processing (1)
  • crates/biome_graphql_analyze/Cargo.toml
✅ Files skipped from review due to trivial changes (1)
  • crates/biome_graphql_analyze/Cargo.toml

Walkthrough

The PR moves camino to regular dependencies and adds a project-scoped services system for the GraphQL analyser. It introduces GraphqlAnalyzerServices and GraphqlProjectIndex, new public entrypoints analyze_with_services / analyze_with_services_and_inspect_matcher, a services module, and refactors the NoDuplicateGraphqlOperationName rule to use ProjectGraphqlRoot and consult the project index. Unit tests exercising cross-file duplicate detection were added.

Possibly related PRs

Suggested labels

A-Project, A-Diagnostic

Suggested reviewers

  • ematipico
  • dyc3
🚥 Pre-merge checks | ✅ 3 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The PR partially addresses issue #8807 by implementing a foundational operation name index service, though it stops short of the full schema service requirement that includes field validation and remote schema fetching. Clarify whether this PR is intended as a complete solution to #8807 or as a phased approach, and document any follow-up work needed for schema validation features.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately summarizes the primary change: adding a GraphQL project operation index service that enables cross-file operation tracking.
Description check ✅ Passed The description is clearly related to the changeset, outlining the three main objectives: adding the project index service, threading analyzer services through a new entrypoint, and updating the duplicate operation name rule.
Out of Scope Changes check ✅ Passed All changes are directly scoped to implementing the operation index service and updating the duplicate operation name rule; no extraneous modifications detected.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Mar 29, 2026

Merging this PR will not alter performance

✅ 9 untouched benchmarks
⏩ 219 skipped benchmarks1


Comparing raashish1601:contributor-05-8807-project-graphql-index (e20f2c7) with main (c17e08e)2

Open in CodSpeed

Footnotes

  1. 219 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.

  2. No successful run was found on main (cc6f2f6) during the generation of this report, so c17e08e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@Conaclos Conaclos added the M-Likely Agent This was likely an automated PR without a human in the loop label Mar 29, 2026
@ematipico ematipico closed this Mar 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Linter Area: linter M-Likely Agent This was likely an automated PR without a human in the loop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

📎 Graphql schema service

3 participants