apollo-federation-ruby icon indicating copy to clipboard operation
apollo-federation-ruby copied to clipboard

support @cacheControl

Open linstantnoodles opened this issue 2 years ago • 1 comments

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

linstantnoodles avatar May 22 '23 16:05 linstantnoodles

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

ghost avatar Jun 24 '23 22:06 ghost