-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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 BatchHttpLink
regression that silently discarded some pending queries
#9793
Conversation
…cel" This reverts commit cefd24c, reversing changes made to d98f1de. I plan to publish this version in the next v3.7.0 beta release, then immediately reinstate most of this functionality, with a narrower attempt to solve issue #9773 in a follow-up beta release, to allow folks to compare the behavior of those two versions.
This reverts commit 0e68db1.
Inspired by issue #9773.
Should fix issue #9773.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @benjamn - thanks!
PR #9793 was first released in v3.7.0-beta.3 for testing, and now (in this PR) will be backported to the `main` branch, to be released in the next v3.6.x patch version, fixing a `BatchHttpLink` regression introduced in v3.6.0 that silently discarded some pending queries. Evidence this worked: - #9773 (comment) - #9690 (comment) - #9690 (comment) - #9690 (comment) - #9690 (comment)
|
||
userEvent.click(screen.getByRole('button', { name: /mutate/i })); | ||
|
||
await screen.findByText('item 3'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Glad I was able to help! Testing Library is great, definitely worth checking it out!
@benjamn this issue seems to be back with the release of 3.7.0. Some queries are hanging indefinitely in the loading state. Replacing the |
This PR attempts to fix both #9690 and #9773 by first reverting PR #9248 (which seems to be the source of the problems with
BatchHttpLink
), then publishing@apollo/client@3.7.0-beta.2
for comparison purposes, then un-reverting #9248 and instead tweaking the unsubscription logic to make all the tests pass (with most of PR #9428 still applied), then publishing@apollo/client@3.7.0-beta.3
with the final changes, so folks can try/test both versions on therelease-3.7
branch before we release these changes in the next v3.6.x release (hence the v3.6.x patch releases milestone).