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

Make Redis Optional #94

Open
jon-frankel opened this issue Jan 10, 2022 · 2 comments
Open

Make Redis Optional #94

jon-frankel opened this issue Jan 10, 2022 · 2 comments

Comments

@jon-frankel
Copy link

Hello! We are in the process of setting the Schema Registry for our federated gateway. It's been fairly easy and straightforward so far.

It appears that Redis is only ever used by the persisted_queries utility. If this endpoint/type is never used, then there is no need to have Redis running alongside the schema registry.

It is also not clear from the documentation how this endpoint is meant to be used, as the APQ option in Apollo does not include a REST or separate GraphQL API as an option for a cache layer. I'm not really sure what the use case is for this endpoint.

At any rate, the service is able to run without Redis, but calling the persisted_queries results in the request timing out. Perhaps we could have a flag to exit early from that endpoint and return a 404?

Thank you!

@tot-ra
Copy link
Owner

tot-ra commented Jan 10, 2022

hey.
You are right, redis is not critical dependency and can be ommited.
Automatic persisted are an apollo feature and yes, we don't have an example how exactly to use it. But basically, you can pass custom class to apollo server that will implement cache get/set and instead of using redis, it can make requests to schema-registry that would manage these things.

You can make a PR to ignore redis in those endpoints. It was meant for performance (to avoid going to DB)

@jon-frankel
Copy link
Author

Thanks for the insight. I may open a PR, though since it works fine as-is without Redis, this is low on our priority list for now.

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

No branches or pull requests

2 participants