Skip to content

fix: Make SubscriptionStream initializer public#975

Merged
AnthonyMDev merged 1 commit intomainfrom
fix/3637-public-subscription-stream-init
May 8, 2026
Merged

fix: Make SubscriptionStream initializer public#975
AnthonyMDev merged 1 commit intomainfrom
fix/3637-public-subscription-stream-init

Conversation

@AnthonyMDev
Copy link
Copy Markdown
Contributor

Summary

  • Makes the SubscriptionStream initializer public (was package) so adopters can construct SubscriptionStream values from custom SubscriptionNetworkTransport conformances.

In v2.1.0 the SubscriptionNetworkTransport.send(subscription:...) return type changed from AsyncThrowingStream<...> to SubscriptionStream<...>. Because SubscriptionStream's only initializer was package-scoped, it became impossible to write a custom conformance to the public SubscriptionNetworkTransport protocol from outside the module.

The other types involved (SubscriptionState, AsyncThrowingStream) are already public, so opening up the initializer is sufficient.

Fixes #3637.

Test plan

  • Build succeeds (Apollo scheme)
  • CI green

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>
@apollo-librarian
Copy link
Copy Markdown

apollo-librarian Bot commented May 8, 2026

✅ Docs preview has no changes

The preview was not built because there were no changes.

Build ID: 910eb08511f32e1a3b0fe7f8
Build Logs: View logs


✅ AI Style Review — No Changes Detected

No MDX files were changed in this pull request.

Review Log: View detailed log

This review is AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 8, 2026

Deploy Preview for apollo-ios-docc canceled.

Name Link
🔨 Latest commit d2af00e
🔍 Latest deploy log https://app.netlify.com/projects/apollo-ios-docc/deploys/69fe35ac8f0b410008fa4fb7

@AnthonyMDev AnthonyMDev merged commit da2c22a into main May 8, 2026
22 checks passed
@AnthonyMDev AnthonyMDev deleted the fix/3637-public-subscription-stream-init branch May 8, 2026 19:24
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrating conformance to SubscriptionNetworkTransport for v2.1.0 +

1 participant