[Fusion] Remove empty types after excluding all members via tagging#9359
[Fusion] Remove empty types after excluding all members via tagging#9359
Conversation
Fusion Gateway Performance Results
Simple Composite Query
Response Times
Deep Recursion Query
Response Times
Variable Batching Throughput
Response Times
Runner 1 = benchmarking-1Run 22960293478 • Commit 0f432a1 • Wed, 11 Mar 2026 15:25:52 GMT |
There was a problem hiding this comment.
Pull request overview
This PR updates Fusion source schema preprocessing so that when ExcludeByTag removes all members of a type, the now-empty type is removed from the schema (including root operation types).
Changes:
- Remove object/interface types from
schema.Typesif all fields were excluded by tag. - Remove input object types if all input fields were excluded by tag, and enum types if all values were excluded by tag.
- Clear
schema.QueryType/MutationType/SubscriptionTypewhen they become empty after exclusion; add a regression test for this behavior.
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/SourceSchemaPreprocessor.cs | Removes empty types after tag-based exclusion and clears empty root operation types. |
| src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs | Adds a test asserting empty root types and other empty types are removed after exclusion. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/HotChocolate/Fusion/src/Fusion.Composition/SourceSchemaPreprocessor.cs
Outdated
Show resolved
Hide resolved
src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/HotChocolate/Fusion/src/Fusion.Composition/SourceSchemaPreprocessor.cs
Outdated
Show resolved
Hide resolved
src/HotChocolate/Fusion/src/Fusion.Composition/SourceSchemaPreprocessor.cs
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary of the changes (Less than 80 chars)