question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[v3.4rc19] Query ancellation appears broken in 3.4

See original GitHub issue

Intended outcome:

Previous GraphQL query is cancelled automatically when repeated.

Actual outcome:

Previous GraphQL query is cancelled… but new one is not triggered.

How to reproduce the issue:

I’ll try to get a repo up and running, but I wanted to mention it quick, since it seems we are getting close to the official 3.4.

Essentially I have a classic, debounced “search” input field, where our user will type a few letters and the UI will perform a search query every X milliseconds once the field has debounced. This used to work nicely in 3.3; if a GraphQL query was still in flight by the time the UI next debounced, the new query would cancel the old one before the new one would take over.

See Network tab below, where 2 queries were cancelled, and the last one succeeded (since the user stopped typing):

image

This is no longer the case for me in 3.4rc19, the old one is cancelled… but the new one never goes through. See below, the old one is cancelled, but no new one in sight.

image

Versions

 System:
    OS: macOS Mojave 10.14.6
  Binaries:
    Node: 16.4.2 - /usr/local/bin/node
    Yarn: 1.22.10 - /usr/local/bin/yarn
    npm: 7.18.1 - /usr/local/bin/npm
  Browsers:
    Chrome: 91.0.4472.114
    Safari: 14.0.3

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:3
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
sebastienbarrecommented, Aug 5, 2021

@brainkim I tried with 3.4.4, it was still broken. I just tried with 3.4.5, and that indeed fixed it, thanks 😃 Maybe I’ll try to live dangerously and finally push 3.4 to production 😃 Thanks again.

1reaction
rossm6commented, Jul 19, 2021

I’ve just un-installed “3.4.0-rc.6” and installed “3.4.0-rc.18” to see if it helps with the problems I’ve been having but a useLazyQuery which has “fetchPolicy” of “network-only” and “nextFetchPolicy” of “cache-first” now gets cancelled and another IS NOT triggered.

My problem is #8514 (actually two problems).

Read more comments on GitHub >

github_iconTop Results From Across the Web

[v3.4rc19] Query ancellation appears broken in 3.4 - apollo-client
[v3.4rc19] Query ancellation appears broken in 3.4 - apollo-client. Intended outcome: Previous GraphQL query is cancelled automatically when repeated.
Read more >
Untitled
Aegiphila bogotensis, Maurine karagianis twitter, 2a b grupo 3, Stone muretto ... Colinas verdes subdivision, E8400 overclock 3.4, David bergquist artist.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found