-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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 QueryManager to make better use of observables and enforce fetchPolicy more reliably #6221
Commits on May 7, 2020
-
Configuration menu - View commit details
-
Copy full SHA for e1a416a - Browse repository at this point
Copy the full SHA e1a416aView commit details -
These tests were swallowing "No more mocked responses..." errors because of the missing call to setOnError. After I fixed that, the tests began consistently failing because they made too many requests of the mock link chain, so I reduced the expected number of requests, while mostly preserving the original spirit of the tests.
Configuration menu - View commit details
-
Copy full SHA for e8f4674 - Browse repository at this point
Copy the full SHA e8f4674View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f0e5ba - Browse repository at this point
Copy the full SHA 1f0e5baView commit details -
Configuration menu - View commit details
-
Copy full SHA for c392e95 - Browse repository at this point
Copy the full SHA c392e95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8b84ed6 - Browse repository at this point
Copy the full SHA 8b84ed6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c38470 - Browse repository at this point
Copy the full SHA 3c38470View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94fe1ff - Browse repository at this point
Copy the full SHA 94fe1ffView commit details -
Rename multiplex to multicast.
Though this API is not perfectly aligned with the RxJS multicast operator (no explicit Subject, for example), the spirit is definitely the same, and "multiplex" was mistaken terminology: https://rxjs.dev/api/operators/multicast
Configuration menu - View commit details
-
Copy full SHA for 8fa1457 - Browse repository at this point
Copy the full SHA 8fa1457View commit details -
Configuration menu - View commit details
-
Copy full SHA for a0b6525 - Browse repository at this point
Copy the full SHA a0b6525View commit details -
Configuration menu - View commit details
-
Copy full SHA for 816d4f5 - Browse repository at this point
Copy the full SHA 816d4f5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5773ba1 - Browse repository at this point
Copy the full SHA 5773ba1View commit details -
Configuration menu - View commit details
-
Copy full SHA for edd5ba3 - Browse repository at this point
Copy the full SHA edd5ba3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 40e3921 - Browse repository at this point
Copy the full SHA 40e3921View commit details -
Configuration menu - View commit details
-
Copy full SHA for d84ee83 - Browse repository at this point
Copy the full SHA d84ee83View commit details -
Configuration menu - View commit details
-
Copy full SHA for 35502f4 - Browse repository at this point
Copy the full SHA 35502f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 570cb66 - Browse repository at this point
Copy the full SHA 570cb66View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4b24a39 - Browse repository at this point
Copy the full SHA 4b24a39View commit details -
Configuration menu - View commit details
-
Copy full SHA for be8c20a - Browse repository at this point
Copy the full SHA be8c20aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6c0ef9f - Browse repository at this point
Copy the full SHA 6c0ef9fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d77948 - Browse repository at this point
Copy the full SHA 9d77948View commit details -
Configuration menu - View commit details
-
Copy full SHA for e58b2d6 - Browse repository at this point
Copy the full SHA e58b2d6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 85a07d4 - Browse repository at this point
Copy the full SHA 85a07d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 180fb00 - Browse repository at this point
Copy the full SHA 180fb00View commit details -
Configuration menu - View commit details
-
Copy full SHA for 34e19e8 - Browse repository at this point
Copy the full SHA 34e19e8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 58a88ca - Browse repository at this point
Copy the full SHA 58a88caView commit details -
Configuration menu - View commit details
-
Copy full SHA for 428655a - Browse repository at this point
Copy the full SHA 428655aView commit details -
Configuration menu - View commit details
-
Copy full SHA for cba7240 - Browse repository at this point
Copy the full SHA cba7240View commit details -
Configuration menu - View commit details
-
Copy full SHA for ae3f6d5 - Browse repository at this point
Copy the full SHA ae3f6d5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 99014ed - Browse repository at this point
Copy the full SHA 99014edView commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c17286 - Browse repository at this point
Copy the full SHA 3c17286View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d6646c - Browse repository at this point
Copy the full SHA 0d6646cView commit details -
Use ObservableQuery.reobserve when polling, when possible.
If we move polling logic from QueryManager into ObservableQuery, then we will always have an ObservableQuery available to consume results when we are polling, which should eliminate the non-ObservableQuery branch of this condition.
Configuration menu - View commit details
-
Copy full SHA for f141aa7 - Browse repository at this point
Copy the full SHA f141aa7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a414a5 - Browse repository at this point
Copy the full SHA 3a414a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8aeeba4 - Browse repository at this point
Copy the full SHA 8aeeba4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3c7d00e - Browse repository at this point
Copy the full SHA 3c7d00eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 71733c7 - Browse repository at this point
Copy the full SHA 71733c7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 23b9d07 - Browse repository at this point
Copy the full SHA 23b9d07View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a40aef - Browse repository at this point
Copy the full SHA 6a40aefView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6acaa37 - Browse repository at this point
Copy the full SHA 6acaa37View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9793b7d - Browse repository at this point
Copy the full SHA 9793b7dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e6c8d1 - Browse repository at this point
Copy the full SHA 6e6c8d1View commit details -
Configuration menu - View commit details
-
Copy full SHA for c1293d8 - Browse repository at this point
Copy the full SHA c1293d8View commit details -
Fall back to queryInfo.getDiff() if diff.result empty.
I'm not completely happy with this, but it seems to keep some existing tests passing.
Configuration menu - View commit details
-
Copy full SHA for 397a8aa - Browse repository at this point
Copy the full SHA 397a8aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c4ca3d4 - Browse repository at this point
Copy the full SHA c4ca3d4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b88da6d - Browse repository at this point
Copy the full SHA b88da6dView commit details -
Configuration menu - View commit details
-
Copy full SHA for ecfa334 - Browse repository at this point
Copy the full SHA ecfa334View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9f40894 - Browse repository at this point
Copy the full SHA 9f40894View commit details -
Configuration menu - View commit details
-
Copy full SHA for c9dc1b0 - Browse repository at this point
Copy the full SHA c9dc1b0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2f560ed - Browse repository at this point
Copy the full SHA 2f560edView commit details -
Configuration menu - View commit details
-
Copy full SHA for f7253c4 - Browse repository at this point
Copy the full SHA f7253c4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6151bbe - Browse repository at this point
Copy the full SHA 6151bbeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0c1cdf6 - Browse repository at this point
Copy the full SHA 0c1cdf6View commit details -
Rename fqoHelper to fetchQueryHelper.
Since it now returns an array of observables, rather than a combined observable, the 'o' in fqoHelper is no longer strictly warranted.
Configuration menu - View commit details
-
Copy full SHA for 2186aeb - Browse repository at this point
Copy the full SHA 2186aebView commit details -
Configuration menu - View commit details
-
Copy full SHA for 59ca80a - Browse repository at this point
Copy the full SHA 59ca80aView commit details -
Configuration menu - View commit details
-
Copy full SHA for b411ee5 - Browse repository at this point
Copy the full SHA b411ee5View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff04d02 - Browse repository at this point
Copy the full SHA ff04d02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 45a07a3 - Browse repository at this point
Copy the full SHA 45a07a3View commit details -
Simplify QueryInfo#shouldNotify.
QueryManager#fetchQueryObservable now manages this logic (see mightUseNetwork and related code), so we don't need to do as much work in shouldNotify.
Configuration menu - View commit details
-
Copy full SHA for 9dd15b8 - Browse repository at this point
Copy the full SHA 9dd15b8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 665c4cb - Browse repository at this point
Copy the full SHA 665c4cbView commit details -
ObservableQuery#isTornDown is not a public property, so testing its value by abusing the type system was always a bit of an overreach.
Configuration menu - View commit details
-
Copy full SHA for 098c060 - Browse repository at this point
Copy the full SHA 098c060View commit details -
Configuration menu - View commit details
-
Copy full SHA for b239124 - Browse repository at this point
Copy the full SHA b239124View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8c37713 - Browse repository at this point
Copy the full SHA 8c37713View commit details -
TODO These changes might not be necessary if we were properly updating/delivering loading states for the original query for which we're fetching more results. The tests that I removed entirely were duplicates of other tests that I fixed/adjusted.
Configuration menu - View commit details
-
Copy full SHA for 2ce4051 - Browse repository at this point
Copy the full SHA 2ce4051View commit details -
Configuration menu - View commit details
-
Copy full SHA for 691384e - Browse repository at this point
Copy the full SHA 691384eView commit details -
Configuration menu - View commit details
-
Copy full SHA for f952698 - Browse repository at this point
Copy the full SHA f952698View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f9f63d - Browse repository at this point
Copy the full SHA 8f9f63dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 76e22d7 - Browse repository at this point
Copy the full SHA 76e22d7View commit details -
Improve racy subscribeToMore tests.
The use of setTimeout in tests is often an invitation to race conditions and timing-sensitive outcomes. This raciness became particularly problematic thanks to changes (between Node 10 and Node 12) in the timing of Promise callbacks with respect to setTimeout callbacks. These changes also leave all tests passing when cherry-picked onto master, so I'm confident I am *not* changing the tests just to fix my PR #6221, at the expense of backwards compatibility.
Configuration menu - View commit details
-
Copy full SHA for a23c194 - Browse repository at this point
Copy the full SHA a23c194View commit details -
Configuration menu - View commit details
-
Copy full SHA for e7f29aa - Browse repository at this point
Copy the full SHA e7f29aaView commit details -
Configuration menu - View commit details
-
Copy full SHA for bcd1014 - Browse repository at this point
Copy the full SHA bcd1014View commit details -
Configuration menu - View commit details
-
Copy full SHA for e24e446 - Browse repository at this point
Copy the full SHA e24e446View commit details -
Remove redundant addExportedVariables logic from observer.next.
Now that the ObservableQuery consumes results exclusively through QueryManager#fetchQueryObservable, we can rely on the addExportedVariables call that happens there, and avoid potentially re-triggering a network request while consuming network results. @hwillson I was a bit surprised this change didn't cause any tests to fail, but several tests did fail when I cherry-picked it onto master, so I'm optimistic this addExportedVariables logic is genuinely redundant after my refactoring PR #6221.
Configuration menu - View commit details
-
Copy full SHA for 28fc24e - Browse repository at this point
Copy the full SHA 28fc24eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12d6729 - Browse repository at this point
Copy the full SHA 12d6729View commit details -
Update comment in src/core/Reobserver.ts.
Thanks to @danReynolds for catching this. Co-authored-by: Dan Reynolds <me@danreynolds.ca>
Configuration menu - View commit details
-
Copy full SHA for fb6801f - Browse repository at this point
Copy the full SHA fb6801fView commit details -
Configuration menu - View commit details
-
Copy full SHA for c3dae7b - Browse repository at this point
Copy the full SHA c3dae7bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 892ee4e - Browse repository at this point
Copy the full SHA 892ee4eView commit details -
Configuration menu - View commit details
-
Copy full SHA for aecd453 - Browse repository at this point
Copy the full SHA aecd453View commit details -
Configuration menu - View commit details
-
Copy full SHA for b1562e5 - Browse repository at this point
Copy the full SHA b1562e5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4dff16f - Browse repository at this point
Copy the full SHA 4dff16fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 190ce59 - Browse repository at this point
Copy the full SHA 190ce59View commit details -
Avoid unconditionally cancelling cache.watch in updateWatch.
Besides addressing an important TODO, the privatization of the cancel method also resolves #6221 (comment)
Configuration menu - View commit details
-
Copy full SHA for 6122cac - Browse repository at this point
Copy the full SHA 6122cacView commit details -
Configuration menu - View commit details
-
Copy full SHA for cfa385d - Browse repository at this point
Copy the full SHA cfa385dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ff3a59 - Browse repository at this point
Copy the full SHA 6ff3a59View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4e48779 - Browse repository at this point
Copy the full SHA 4e48779View commit details -
Reinstate warnings about missing cache fields.
This functionality was introduced in PR #6058 (beta.43), and was temporarily removed by my refactoring PR #6221. I believe these warnings can be improved, especially since they are pretty noisy right now, but I wanted to preserve existing functionality before trying to figure out a better way to report missing fields. Any/all ideas and feedback welcome.
Configuration menu - View commit details
-
Copy full SHA for 9e56386 - Browse repository at this point
Copy the full SHA 9e56386View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2de0e23 - Browse repository at this point
Copy the full SHA 2de0e23View commit details