-
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
Refactor ObservableQuery#getCurrentResult to reenable immediate delivery of warm cache results. #6710
Commits on Jul 27, 2020
-
Configuration menu - View commit details
-
Copy full SHA for 513d733 - Browse repository at this point
Copy the full SHA 513d733View commit details -
Stop using getCurrentQueryResult in updateQuery.
Reducing the number of calls to getCurrentQueryResult from two to one will make it easier to collapse getCurrentQueryResult into getCurrentResult.
Configuration menu - View commit details
-
Copy full SHA for 01a899e - Browse repository at this point
Copy the full SHA 01a899eView commit details -
Configuration menu - View commit details
-
Copy full SHA for c08043c - Browse repository at this point
Copy the full SHA c08043cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2192f89 - Browse repository at this point
Copy the full SHA 2192f89View commit details -
Bring back QueryInfo#getDiff, and privatize updateWatch.
Managing cache watching is now the exclusive responsibility of the QueryInfo class.
Configuration menu - View commit details
-
Copy full SHA for 383405e - Browse repository at this point
Copy the full SHA 383405eView commit details -
Avoid watching cache for no-cache queries.
Since no-cache queries never read from the cache, there's no point in making them watch the cache for changes, because the cache doesn't know anything about which fields were used by the no-cache query.
Configuration menu - View commit details
-
Copy full SHA for 022c797 - Browse repository at this point
Copy the full SHA 022c797View commit details -
Configuration menu - View commit details
-
Copy full SHA for af2d1e3 - Browse repository at this point
Copy the full SHA af2d1e3View commit details -
Pass QueryInfo into ObservableQuery constructor.
This gives the ObservableQuery direct access to its corresponding QueryInfo object, so the ObservableQuery doesn't have to keep asking the QueryManager for the QueryInfo corresponding to this.queryId. Important invariants: given ObservableQuery oq and QueryManager qm, it should always be the case that qm.queries.get(oq.queryId) === oq.queryInfo, and oq.queryInfo.observableQuery === oq.
Configuration menu - View commit details
-
Copy full SHA for a1cd4f4 - Browse repository at this point
Copy the full SHA a1cd4f4View commit details -
Avoid unnecessarily discarding QueryInfo fields on stop.
Since ObservableQuery objects have a direct reference to their QueryInfo objects, it's possible for an ObservableQuery to find use for these fields even after the QueryManager has stopped the query and removed the QueryInfo object from queryManager.queries.
Configuration menu - View commit details
-
Copy full SHA for 06a1dc2 - Browse repository at this point
Copy the full SHA 06a1dc2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0cf0cbd - Browse repository at this point
Copy the full SHA 0cf0cbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 61e0e62 - Browse repository at this point
Copy the full SHA 61e0e62View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7df6ec0 - Browse repository at this point
Copy the full SHA 7df6ec0View commit details -
Move cache-first fallback logic after first network request.
PR #6353 explains the rationale for switching to a cache-first FetchPolicy after an initial cache-and-network or network-only policy. When #6365 was implemented, options.fetchPolicy was examined only once, at the beginning of fetchQueryObservable, so the timing of changing options.fetchPolicy did not matter as much. However, fixing #6659 involves checking the current options.fetchPolicy whenever the QueryData class calls this.currentObservable.getCurrentResult(), so it's now more important to delay changing options.fetchPolicy until after the first network request has completed.
Configuration menu - View commit details
-
Copy full SHA for 8be3800 - Browse repository at this point
Copy the full SHA 8be3800View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fe8fee - Browse repository at this point
Copy the full SHA 5fe8feeView commit details -
Configuration menu - View commit details
-
Copy full SHA for fb3c913 - Browse repository at this point
Copy the full SHA fb3c913View commit details -
Configuration menu - View commit details
-
Copy full SHA for fd94a3d - Browse repository at this point
Copy the full SHA fd94a3dView commit details