Skip to content

[Fusion] Do not apply @shareable to subscription root fields#9751

Merged
tobias-tengler merged 1 commit into
mainfrom
tte/do-not-apply-shareable-to-subscription-type
May 20, 2026
Merged

[Fusion] Do not apply @shareable to subscription root fields#9751
tobias-tengler merged 1 commit into
mainfrom
tte/do-not-apply-shareable-to-subscription-type

Conversation

@tobias-tengler
Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 20, 2026 12:24
@tobias-tengler tobias-tengler changed the title [Fusion[ Do not apply @shareable to subscription root fields [Fusion] Do not apply @shareable to subscription root fields May 20, 2026
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 v1 compatibility preprocessing so @shareable is not automatically applied to fields on the subscription root type, and adds a regression test to lock in the behavior.

Changes:

  • Skip the subscription root type when applying inferred @shareable directives during Fusion v1 compatibility preprocessing.
  • Add a unit test verifying that subscription root fields do not receive @shareable even when present in multiple source schemas.

Reviewed changes

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

File Description
src/HotChocolate/Fusion/src/Fusion.Composition/SourceSchemaPreprocessor.cs Excludes schema.SubscriptionType from inferred @shareable application in v1 compatibility mode.
src/HotChocolate/Fusion/test/Fusion.Composition.Tests/SourceSchemaPreprocessorTests.cs Adds regression coverage ensuring subscription root fields are not marked @shareable.

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

@tobias-tengler tobias-tengler merged commit 6bae505 into main May 20, 2026
145 checks passed
@tobias-tengler tobias-tengler deleted the tte/do-not-apply-shareable-to-subscription-type branch May 20, 2026 12:30
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