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.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or setup this action to publish automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to release-4.0, this PR will be updated.
release-4.0
is currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exit
onrelease-4.0
.Releases
@apollo/[email protected]
Major Changes
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.#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.