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

Make updating cache.makeVar variables broadcast watches. #5976

Merged
merged 3 commits into from
Feb 21, 2020

Commits on Feb 21, 2020

  1. Stop using proxy objects for InMemoryCache transactions.

    This essentially undoes #5484, so that reactive variables (which have
    access to the InMemoryCache object but know nothing about proxy objects)
    can benefit from transactional broadcast batching when calling
    cache.broadcastWatches().
    benjamn committed Feb 21, 2020
    Configuration menu
    Copy the full SHA
    42878cb View commit details
    Browse the repository at this point in the history
  2. Rename InMemoryCache#makeLocalVar to makeVar.

    Shorter, and not as suggestive of Apollo Client 2.x local state. Returns a
    function of type ReactiveVar<T> (f.k.a. LocalVar<T>).
    
    Follow-up to #5799.
    benjamn committed Feb 21, 2020
    Configuration menu
    Copy the full SHA
    286c10a View commit details
    Browse the repository at this point in the history
  3. Make ReactiveVar updates trigger cache.broadcastWatches().

    The broadcast is always synchronous, but you can group multiple variable
    updates together (with just one broadcast) using cache.performTransaction.
    benjamn committed Feb 21, 2020
    Configuration menu
    Copy the full SHA
    80d1fad View commit details
    Browse the repository at this point in the history