fix: Make SubscriptionStream initializer public#975
Merged
AnthonyMDev merged 1 commit intomainfrom May 8, 2026
Merged
Conversation
The `SubscriptionStream` initializer was scoped to `package`, preventing adopters from writing custom conformances to the public `SubscriptionNetworkTransport` protocol. Make it `public` so custom transport implementations can construct the stream. Fixes #3637. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
✅ Docs preview has no changesThe preview was not built because there were no changes. Build ID: 910eb08511f32e1a3b0fe7f8 ✅ AI Style Review — No Changes DetectedNo MDX files were changed in this pull request. Review Log: View detailed log
|
✅ Deploy Preview for apollo-ios-docc canceled.
|
BobaFetters
pushed a commit
that referenced
this pull request
May 8, 2026
586103d23 fix: Make SubscriptionStream initializer public (#975) git-subtree-dir: apollo-ios git-subtree-split: 586103d23c9131f385dab2678c1cd708a1047cf4
BobaFetters
pushed a commit
that referenced
this pull request
May 8, 2026
…r public git-subtree-dir: apollo-ios git-subtree-mainline: da2c22a git-subtree-split: 586103d23c9131f385dab2678c1cd708a1047cf4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SubscriptionStreaminitializerpublic(waspackage) so adopters can constructSubscriptionStreamvalues from customSubscriptionNetworkTransportconformances.In v2.1.0 the
SubscriptionNetworkTransport.send(subscription:...)return type changed fromAsyncThrowingStream<...>toSubscriptionStream<...>. BecauseSubscriptionStream's only initializer waspackage-scoped, it became impossible to write a custom conformance to the publicSubscriptionNetworkTransportprotocol from outside the module.The other types involved (
SubscriptionState,AsyncThrowingStream) are already public, so opening up the initializer is sufficient.Fixes #3637.
Test plan
Apolloscheme)