Major Changes
- #12663
01512f2
Thanks @jerelmiller! - Unsubscribing from anObservableQuery
before a value has been emitted will remove the query from the tracked list of queries and will no longer be eligible for query deduplication.
Minor Changes
-
#12663
01512f2
Thanks @jerelmiller! - Subscriptions created byclient.subscribe()
can now be restarted. Restarting a subscription will terminate the connection with the link chain and recreate the request. Restarts also work across deduplicated subscriptions so callingrestart
on anobservable
who's request is deduplicated will restart the connection for each observable.const observable = client.subscribe({ query: subscription }); // Restart the connection to the link observable.restart();
-
#12663
01512f2
Thanks @jerelmiller! - Deduplicating subscription operations is now supported. Previously it was possible to deduplicate a subscription only if the new subscription was created before a previously subscribed subscription emitted any values. As soon as a value was emitted from a subscription, new subscriptions would create new connections. Deduplication is now active for as long as a subscription connection is open (i.e. the source observable hasn't emitted acomplete
orerror
notification yet.)To disable deduplication and force a new connection, use the
queryDeduplication
option incontext
like you would a query operation.As a result of this change, calling the
restart
function returned fromuseSubscription
will now restart the connection on deduplicated subscriptions.