Skip to content
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

Avoid full reapplication of cache-and-network and network-only fetch policies after successful fetchMore #9504

Merged
merged 21 commits into from
Mar 29, 2022

Commits on Mar 29, 2022

  1. Adjust fetchMore tests to use TypedDocumentNode and subscribeAndCount.

    Although these test updates may seem substantial, I believe this
    refactoring makes the tests more robust without changing what they test.
    To that end, it's important to note these tests are all passing at this
    point in the commit history, before any of the more substantive changes
    from PR #9504, and continue passing even after those changes are
    introduced, with relatively few additional test changes.
    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    8f7a3ed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c274f68 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a6ba39c View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7e3dd93 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    6177575 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    6dccb8d View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    a1d4a82 View commit details
    Browse the repository at this point in the history
  8. A TODO to investigate.

    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    53a246b View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    e320eb5 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    c5b522d View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    3f7bce4 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    857583c View commit details
    Browse the repository at this point in the history
  13. Remove nagging updateQuery deprecation warning.

    Now that fetchMore's updateQuery callback is implemented in terms of the
    supported/documented cache.updateQuery method, I feel better about
    allowing fetchMore to continue to take an updateQuery callback.
    
    Also, everyone with any ability to migrate from updateQuery to
    InMemoryCache field policies has presumably already done so, so this
    warning is less useful now than it was following the release of AC3.
    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    1b3406a View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    f7dd5f4 View commit details
    Browse the repository at this point in the history
  15. Use reobserveCacheFirst in !diff.complete case, too.

    When `!diff.complete`, `oq.reobserveCacheFirst()` should behave exactly
    like `oq.reobserve()`, since the fetch policies `reobserveCacheFirst`
    modifies (`network-only` and `cache-and-network`) behave the same as the
    `cache-first` policy when cache results are incomplete.
    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    33e85c7 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    359ed59 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    521ec2d View commit details
    Browse the repository at this point in the history
  18. Mention PR #9504 in CHANGELOG.md.

    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    0548f29 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    cfc8cad View commit details
    Browse the repository at this point in the history
  20. Bring back cache.batch to ensure delivery of unchanged results.

    This reverts commits d5463be and
    0170f32, with a new test showing why
    the backup reobserveCacheFirst call in the finally block is important:
    sometimes the cache write doesn't change any data in the cache, so no
    broadcast happens, but we still need to deliver the final loading:false
    result for the fetchMore request.
    benjamn committed Mar 29, 2022
    Configuration menu
    Copy the full SHA
    e5ed91a View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    5036dc5 View commit details
    Browse the repository at this point in the history