Skip to content
Discussion options

You must be logged in to vote

Passing cache to new ApolloServer makes the cache available for Apollo Server's own features (implemented in core or in plugins) that want to use a cache, such as the full operation response cache, the HTTP cache for the REST Data Source, the Automatic Persisted Query cache, etc. We have an interface KeyValueCache that we use to allow multiple implementations to work for these features (though we are planning to replace this with another project's abstraction, see #6045).

This cache isn't made directly available to your resolvers. The "context" object on which you are looking for a client is actually completely controlled by the context function you pass to your ApolloServer constructor. …

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jkshobby
Comment options

Answer selected by jkshobby
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants