subscribe method
Subscribes to a GraphQL subscription according to the options specified.
The higher the priority, the earlier this subscription will be
subscribed to in a rate limiter queue.
Implementation
Stream<QueryResult> subscribe(
SubscriptionOptions options, {
FutureOr<Version?> Function()? ver,
bool resubscribe = true,
int priority = 0,
}) {
return SubscriptionHandle(
_subscribe,
(e) {
_subscriptions.remove(e);
e?.dispose();
},
options,
ver: ver,
resubscribe: resubscribe,
priority: priority,
).stream;
}