Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(core): Add missing dedupe operation logic #3101

Merged
merged 1 commit into from
Mar 27, 2023
Merged

Conversation

kitten
Copy link
Member

@kitten kitten commented Mar 26, 2023

Summary

This adds the missing logic that handles deduplication before a response has come back for a query or subscription operation. While we already ported logic from the dedupExchange to the Client that disallowed sending new operations for operations that currently have a hasNext flag set or are active, we now also take care of dispatched operations that haven't received a response yet.

The tests validate that the behaviour is equivalent to before and that operations are dispatched when reexecuteOperation is called, since those are on a delay, so that reexecutions can come through, for requestPolicy upgrades (e.g. for cache-and-network)

Set of changes

  • Add missing teardown and dispatched checks to Client for dedupExchange replacement logic

Copy link
Collaborator

@JoviDeCroock JoviDeCroock left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we make the dedupExchange a noop?

@kitten kitten merged commit 85fb3ab into main Mar 27, 2023
@kitten kitten deleted the fix/dedupe-replace-logic branch March 27, 2023 13:47
This was referenced Mar 27, 2023
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.

2 participants