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
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
OnCompleted should be called after query result is fetched.
The problem appears to be solved only with the component as stated here: #2177
With the useQuery or useLazyQuery hooks the problem still appears.
If i set { fetchPolicy: "no-cache" } for the query the onCompleted will be called as expected.
Actual outcome:
onCompleted is only called after the first call/render. On any subsequent calls it is not invoked.
onCompleted is only called after the first call to Load() as shown in the console.
Version react-apollo: v3.1.0 release
The text was updated successfully, but these errors were encountered:
Hianz
changed the title
Query.onCompleted isn't fired after fetching data from the cache
useLazyQuery / useQuery hook still isn't fired after fetching data from the cache
Sep 12, 2019
Intended outcome:
OnCompleted
should be called after query result is fetched.The problem appears to be solved only with the component as stated here:
#2177
With the useQuery or useLazyQuery hooks the problem still appears.
If i set
{ fetchPolicy: "no-cache" }
for the query the onCompleted will be called as expected.Actual outcome:
onCompleted is only called after the first call/render. On any subsequent calls it is not invoked.
How to reproduce the issue:
Here is a sandbox to reproduce the problem: https://codesandbox.io/s/vigilant-maxwell-gqyf2?fontsize=14
onCompleted is only called after the first call to Load() as shown in the console.
Version
react-apollo: v3.1.0 release
The text was updated successfully, but these errors were encountered: