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

support @cacheControl #246

Open
linstantnoodles opened this issue May 22, 2023 · 1 comment
Open

support @cacheControl #246

linstantnoodles opened this issue May 22, 2023 · 1 comment

Comments

@linstantnoodles
Copy link

Apollo server implementations recognize cacheControl directives from subgraphs, but there doesn't seem to currently be a way to define this directive on fields.

Apollo Server recognizes the @CacheControl directive, which you can use in your schema to define caching behavior either for a single field, or for all fields that return a particular type.
Source: https://www.apollographql.com/docs/apollo-server/performance/caching/#in-your-schema-static

@KMoscIszko
Copy link

KMoscIszko commented Jun 24, 2023

So basicaly you want to field/fields cache, have I understood correctly?
How about caching through https://github.com/DmitryTsepelev/graphql-ruby-fragment_cache
Cache goes to redis on subgraph level, preventing activerecord call and then all subgraphs reuses all those data.
so the flow would be. It not cached, calls activerecord.
Zrzut ekranu 2023-06-25 001354

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant