Closed Kashuab closed 1 year ago
We should support the cache policies that mst-gql supports:
mst-gql
"cache-first"
"cache-only"
"cache-and-network"
"network-only"
"no-cache"
Done. Implemented DepotGQLClient which acts as a wrapper around GraphQLClient from graphql-request, which adds a cache layer that integrates with the RootStore.
DepotGQLClient
GraphQLClient
graphql-request
RootStore
See docs: https://mobx-depot.dev/docs/caching
We should support the cache policies that
mst-gql
supports:"cache-first"
: Use cache if available, avoid network request if possible"cache-only"
: Use cache if available, or error if this request was not made before"cache-and-network"
: Use cache, but still send request and update cache in the background"network-only"
: Skip cache, but cache the result"no-cache"
: Skip cache, and don't cache the response either