graphql-mesh
graphql-mesh copied to clipboard
Handler level plugins/middlewares (mocking, response-caching, rate limiting etc)
In order to have mocking, response caching capabilities in the handler level
I started to play with the cache today and set up a file-cache as per the docs. I was surprised to see that the cache file does NOT get populated with any data. We are using GraphQL as well as OpenAPI sources.
I would have expected that at least the OpenAPI-based sources would leverage the cache for HTTP header-based caching so we could reduce the load on our downstream source services.
If I read this issue and the GraphQL Mesh source code correctly, this use-case is not (yet ?) covered. Correct?
What would you recommend to do in the meantime? Can we inject a custom fetch handler and implement caching on that level ourselves or do you have any other recommended path? π€
Actually, my bad. I should have seen this docu page earlier. π
That actually seem to do what I am looking for. Sorry for the spam π¬
Let's make things clear at first :) There are cache storage implementations such as file, redis etc which defines WHERE you store the data. It doesn't define HOW things are cached. There are plugins for this purpose; Response Caching, HTTP Caching etc to define HOW the data is cached.