Skip to content

[Fusion] Prune unreachable types from source schemas after preprocessing#9767

Merged
tobias-tengler merged 3 commits into
mainfrom
tte/prune-source-schemas-after-preprocessing
May 22, 2026
Merged

[Fusion] Prune unreachable types from source schemas after preprocessing#9767
tobias-tengler merged 3 commits into
mainfrom
tte/prune-source-schemas-after-preprocessing

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

@tobias-tengler tobias-tengler marked this pull request as ready for review May 22, 2026 07:56
Copilot AI review requested due to automatic review settings May 22, 2026 07:56
@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (1f0b160) to head (2255b20).

Additional details and impacted files
@@     Coverage Diff      @@
##   main   #9767   +/-   ##
============================
============================

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates Fusion composition to prune unreachable type system definitions from source schemas after preprocessing/enrichment, preventing validation/merge failures caused by orphaned types (e.g., when ExcludeByTag removes an entry-point and leaves a now-unreachable type behind).

Changes:

  • Prunes unreferenced definitions from each source schema prior to source schema validation.
  • Adds a regression test ensuring tag-based exclusion doesn’t accidentally trigger InvalidFieldSharing due to an orphaned type collision.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/HotChocolate/Fusion/src/Fusion.Composition/SchemaComposer.cs Adds a pruning pass over source schemas before validation to drop unreachable definitions.
src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SchemaComposerTests.cs Adds a test case reproducing an orphaned-type collision scenario after tag exclusion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/HotChocolate/Fusion/src/Fusion.Composition/SchemaComposer.cs Outdated
Comment thread src/HotChocolate/Fusion/src/Fusion.Composition/SchemaComposer.cs Outdated
@tobias-tengler tobias-tengler merged commit 39e9f92 into main May 22, 2026
140 of 142 checks passed
@tobias-tengler tobias-tengler deleted the tte/prune-source-schemas-after-preprocessing branch May 22, 2026 08:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants