-
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
Previous data returned when changing variables and fetchPolicy is network-only (Reproduction Provided) #7978
Comments
Also, if you change |
Updated reproduction to use the latest template and apollo client version (3.3.19), issue is still there |
Thanks for this @dylanwulf - we'll take a closer look. |
@hwillson thank you for the response! sorry for my previous (now deleted) comment, it turned out to be a dumb mistake unrelated to this issue and has been taken care of. The original bug reproduction still stands though. |
Appears to fix #7978. Note that QueryInfo#getDiff knows how to handle fetchPolicy: "no-cache", so it's safe to call it even in that case.
Appears to fix #7978. Note that QueryInfo#getDiff knows how to handle fetchPolicy: "no-cache", so it's safe to call it even in that case.
Confirmed that #8422 fixes this, closing! Thank you so much for your help ❤️ |
Intended outcome:
If I change variable values when
fetchPolicy === 'network-only'
, thendata
should immediately becomeundefined
while the results are being fetched from the server. This seemed to work correctly in v3.0.0 - v3.0.2, but broke in v3.1.0.Actual outcome:
When I change the variable values,
data
still holds the previous data which was associated with the previous variable values.How to reproduce the issue:
https://github.com/dylanwulf/react-apollo-error-template (look at the console as you click the radio buttons)
Possibly related to #7058 and #7048
Versions
The text was updated successfully, but these errors were encountered: