You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
useLazyQuery fails to complete with fetchPolicy set to no-cache or 'network-only'.
However it works when it's set to 'cache-first'
Intended outcome:
When executing the query in useLazy query 'loading' should become false and 'onCompleted' function should be fired once data/response has been received.
Actual outcome:
'loading' remains true and 'onCompleted' never gets called.
useLazyQuery fails to complete with fetchPolicy set to no-cache or 'network-only'.
👍 Experiencing something similar for fetchPolicy: "cache-and-network" when applied to a useLazyQuery hook. Query never completes but works as expected when I remove fetchPolicy. Problem appeared after upgrading from ^3.0.0-beta.19 => 3.0.0-rc.4
useLazyQuery fails to complete with fetchPolicy set to no-cache or 'network-only'.
However it works when it's set to 'cache-first'
Intended outcome:
When executing the query in useLazy query 'loading' should become false and 'onCompleted' function should be fired once data/response has been received.
Actual outcome:
'loading' remains true and 'onCompleted' never gets called.
How to reproduce the issue:
https://codesandbox.io/s/quiet-sea-hj7es?file=/src/App.js
When you click 'Get data' the loading state persists and the onCompleted doesn't fire.
Versions
System:
OS: macOS 10.15.4
Binaries:
Node: 10.17.0 - ~/.nvm/versions/node/v10.17.0/bin/node
Yarn: 1.13.0 - /usr/local/bin/yarn
npm: 6.11.3 - ~/.nvm/versions/node/v10.17.0/bin/npm
Browsers:
Chrome: 83.0.4103.97
Edge: 83.0.478.45
Firefox: 72.0.2
Safari: 13.1
npmPackages:
@apollo/client: ^3.0.0-rc.3 => 3.0.0-rc.3
@apollo/link-context: ^2.0.0-beta.3 => 2.0.0-beta.3
@apollo/link-error: ^2.0.0-beta.3 => 2.0.0-beta.3
apollo-cache-persist: ^0.1.1 => 0.1.1
The text was updated successfully, but these errors were encountered: