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

Rename EntityCache to EntityStore. #5618

Merged
merged 1 commit into from
Nov 25, 2019

Commits on Nov 25, 2019

  1. Rename EntityCache to EntityStore.

    I believe the job of a GraphQL cache is not simply to remember the results
    of past GraphQL queries, but to ingest those queries into a client-side
    data graph that faithfully replicates a subset of the complete data graph
    described by your schema.
    
    To that end, the name `EntityCache` feels slightly inaccurate, because
    this data structure is the source of truth for your client-side data
    graph, which consists of entity objects, their fields, and their
    references to each other, to name just a few concepts that transcend the
    particulars of caching GraphQL results.
    
    Instead, I think `EntityStore` more accurately reflects the first-class
    status of the client-side data graph, with the `InMemoryCache` as a
    wrapper of the `EntityStore` and a consumer of the entity objects that
    reside within it.
    
    If you're curious about the philosophy behind this separation of concerns,
    check out my talk from GraphQL Summit: https://youtu.be/n_j8QckQN5I?t=114
    
    If you don't care about the names of these abstractions, you can rest easy
    knowing that this change is (in some sense) purely cosmetic.
    benjamn committed Nov 25, 2019
    Configuration menu
    Copy the full SHA
    c2200e9 View commit details
    Browse the repository at this point in the history