-
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
RefetchQueries not executed using BatchHttpLink with Apollo Client 3.6.x #9773
Comments
I can confirm that this happens for us as well as soon as we update to |
I also experienced this issue on my current project when updating to latest 3.6.6 version of the client. The reason I can see is because we are using I noticed this case because I was doing the following:
I am only mentioning this because I noticed this when looking at your code. Instead I did something like this:
I don't know why this changed, but I couldn't find proper documentation or example on how to achieve this outcome without the NOTE I want to also confirm that I am using BatchHttpLink. |
…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.
@skrivle @simplecommerce @natterstefan Please try running If that doesn't work, please try |
@benjamn I did a few tests on my end with my project with Appreciate the fix, 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)
This should be fixed if you run |
@benjamn Sorry for the delay. I can indeed confirm 3.7.0-beta.3 solved it for us. Thanks! |
Hi Folks 👋,
We've run into an issue where refetch queries are no longer executed when upgrading to react 3.6.x.
It seems like this is caused by combining BatchHttpLink with Apollo Client 3.6.x. If we configure the BatchHttpLink with
batchMax: 1
the issue goes away.Please note that this could be similar to #9690 but I wasn't sure.
Thanks for all the hard work on Apollo Client 🙏
Intended outcome:
Refetch queries get executed.
Actual outcome:
Refetch queries are not executed
How to reproduce the issue:
I was able to reproduce this issue in a test case using msw.
This is regular CRA project so running
npm install
andnpm test
should do the trick.I have two branches, one with passing tests and one with failing tests where the client is upgraded to 3.6.x:
Passing test using Apollo Client 3.5.10 => https://github.com/skrivle/apollo-refetch-repro/tree/master
Failing test using Apollo Client 3.6.x => https://github.com/skrivle/apollo-refetch-repro/tree/apollo-3.6.x (passes with batchMax set to 1)
Versions
This started happening as of version 3.6.0
The text was updated successfully, but these errors were encountered: