-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[plugin-response-cache] Allow return "null" when cache backend is unavailable #7075
Comments
It could be addressed in I created an issue there. apollographql/apollo-utils#211 |
Thanks, I mentioned on that issue that you can opt in to this functionality via |
Hi @glasser, thanks for the useful info. I implemented the feature according to official docs https://www.apollographql.com/docs/apollo-server/performance/cache-backends/ It would be great if this is mentioned there. |
Makes sense — care to submit a PR against https://github.com/apollographql/apollo-server/blob/main/docs/source/performance/cache-backends.mdx ? |
@glasser I will add it soon. |
I am using
plugin-response-cache
to implement redis cache backend. The plugin makes redis or other cache backend a hard dependency. This means when the apollo server lost connection to redis server, any incoming requests will fail. It would be good to allow the redis client to retry connection. At the same time, any queries with cache control should still function by bypassing cache.This can be achieved easily by adding try-catch block to this line.
Is it worth to add this feature? Meanwhile, if apollo server losts redis connection, the service is totally unusable.
The text was updated successfully, but these errors were encountered: