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

Throw if invalid cache object is provided #1

Open
vieiralucas opened this issue Jun 22, 2018 · 1 comment
Open

Throw if invalid cache object is provided #1

vieiralucas opened this issue Jun 22, 2018 · 1 comment

Comments

@vieiralucas
Copy link

vieiralucas commented Jun 22, 2018

Do you believe it is worth to do this?
I think it might be easier for the user of this library to understand what is going wrong (if you provide a good error message 😸) instead of getting a error like this.cache.keys is not a function.
It also would be a fail fast approach which looks better to me.

BTW this looks awesome! Congratz 🎉

@lucasconstantino
Copy link
Owner

I think there is value in validating if the provided cache object implements the necessary interface. I won't put much efforts on this project for a while, though, because I've being talking to the Apollo Server guys and an integrated solution will be out really soon, as part of the apollo-server project itself.

Perhaps this project will continue active with the intend to provide APQ to servers other than apollo-server, though.

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

2 participants