Skip to content

How to use CacheControl in DgsDataFetchingEnvironment #821

Answered by setchy
jwalton922 asked this question in Q&A
Discussion options

You must be logged in to vote

@jwalton922 - I've recently spent time diving into this rabbit hole.

The current graphql-java class graphql.cachecontrol.CacheControl was added many years ago and was based on the Apollo Cache Control Specification which has since been deprecated. My guess is that the aforementioned class in graphql-java should also be deprecated/removed. Note: this is different from the up-to-date Apollo server-side caching documentation. Some more details can be found here

Now for some good news, there is a open PR for federation-jvm which is very close to being merged and released, which adds in the same cacheControl support that apollo-server (graphql-js) uses. 🎉

Within the PR comments you'll see @berngp

Replies: 4 comments 4 replies

Comment options

You must be logged in to vote
4 replies
@berngp
Comment options

@setchy
Comment options

@setchy
Comment options

@berngp
Comment options

Answer selected by jwalton922
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
5 participants