Queries hang and are not issued on network requests
See original GitHub issueIntended outcome:
Queries should be dispatched to the network.
Actual outcome:
Queries are not dispatched to the network, they just hang.
While using apollo-angular@3.0.1
with @apollo/client@3.6.x
it appears that some queries start hanging after a while.
I’m also using graphql-code-generator to generate an apollo-angular data service, so usage looks like this:
this.someQuery
.fetch({
myVariable: 1
})
.pipe(map((res) => res.data.someQuery))
.subscribe(foo => console.log(foo));
After a while (within 1-2 minutes), the subscribe block will not be called any more. This can also be used with rxjs
’s await firstValueFrom(...)
and the promise will never resolve.
Downgrading to 3.6.2 3.5.10 seems to fix the problem.
How to reproduce the issue:
Unfortunately no repro, but hopefully it might be easy to pinpoint what would affect these by comparing 3.6.2 to 3.6.3. 3.6.0 and 3.5.10.
Versions
System:
OS: macOS 12.3.1
Binaries:
Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node
Yarn: 3.2.0-git.20220329.hash-0764215 - ~/.nvm/versions/node/v16.14.2/bin/yarn
Browsers:
Chrome: 101.0.4951.54
Safari: 15.4
npmPackages:
@apollo/client: 3.6.3 => 3.6.3
apollo-angular: ^3.0.1 => 3.0.1
apollo-link-scalars: ^4.0.1 => 4.0.1
Issue Analytics
- State:
- Created a year ago
- Reactions:5
- Comments:45 (32 by maintainers)
Top GitHub Comments
@jdmoody I appreciate all the details, and while I share your uncertainty about how many different issues we’re talking about here, I think there must be something wrong with
BatchHttpLink
, probably a bug that’s been there for a while but was only revealed by other changes recently, so that’s what I’m currently looking into.Run some e2e tests on 3.7.0-beta.3 and they are all green. Thanks for the update @benjamn