-
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
Make ObservableQuery#getCurrentResult
always call queryInfo.getDiff()
#8422
Make ObservableQuery#getCurrentResult
always call queryInfo.getDiff()
#8422
Conversation
ObservableQuery#getCurrentResult
always call queryInfo.getDiff()
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.
540a1a4
to
f23cba6
Compare
@benjamn Thanks! This does appear to resolve the previous data issue. I do have a question about the |
I'm also a little confused about how Anyways, thanks again! ❤️ EDIT: This behavior with |
@dylanwulf A separate issue/test/repro would be great, if possible! Alternatively, you could try out different beta/rc releases to figure out where the change happened. The first beta was |
@benjamn Ok I submitted a new issue with reproduction in #8426. Looks like it first showed up in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Some of the logic changes might be blocking what I was currently working on.
Appears to fix #7978, by always giving the cache a chance to provide an up-to-date result for the given options, rather than relying on
observableQuery.lastResult
, which may be stale.Note that
QueryInfo#getDiff
knows how to handlefetchPolicy: "no-cache"
, so it's safe to call even in that case.