You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 25, 2025. It is now read-only.
ARCHIVED: GraphQLSwift adopted AsyncSequence in place of its home-grown event stream in v4.0.0, which makes this package obsolete. RxSwift can still be used alongside the AsyncSequence system using it's Concurrency extensions.
GraphQLRxSwift is a small Swift GraphQL/Graphiti subscription driver that allows usage of RxSwift observables
as subscription event streams.
GraphQLRxSwift provides an ObservableEventStream wrapper class that can be used with an RxSwift Observable to satisfy
EventStream requirements. A convenience method toEventStream is added to all Observable instances.
This class is used when defining subscription resolvers, as shown below:
Also provided is a ObservableSubscriptionEventStream type alias that can be used to downcast the result of a subscribe execution.
It is guaranteed that the stream returned by any subscription query whose resolver returns an ObservableEventStream will be a
ObservableSubscriptionEventStream. For example:
letsubscriptionResult=try graphQLApi.subscribe(
request: request,
context: api.context,
on: group
).wait()letsubscription= subscriptionResult.stream as!ObservableSubscriptionEventStream? // Guaranteed
License
This project is released under the MIT license. See LICENSE for details.