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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Other Mercurius plugins.... #295

Open
smolinari opened this issue Nov 27, 2021 · 5 comments
Open

Other Mercurius plugins.... #295

smolinari opened this issue Nov 27, 2021 · 5 comments

Comments

@smolinari
Copy link

smolinari commented Nov 27, 2021

Hey,

is it possible to add other plugins for Mercurius? I'm interested in the auth, cache and validation plugins. I see the upload and altair plugins are hardcoded. Maybe plugins could be made to be pluginable 馃榾?

Scott

@smolinari
Copy link
Author

Actually, I'm tending towards just creating a guard within Nest for Authorization. I'm already using a guard for Authentication. Validation can be handled in Nest too. That leaves just cache (currently) that I am interested in adding.

Scott

@Davide-Gheri
Copy link
Owner

Hey!

yes I saw the mercurius cache plugin and it is quite interesting, we could easliy add a plugins option that simply register the passed plugins to the Fastify instance, but it will be just a "shortcut" to manually call app.register since they are nothing more than Fastify plugins!

@smolinari
Copy link
Author

Whatever you think is best. I'm glad for anything you can get done. :)

Scott

@Davide-Gheri
Copy link
Owner

Hi @smolinari
currently I don't have much time to handle this, but PRs are welcome!

@smolinari
Copy link
Author

I'm a bit tight on time right now too. And currently I'm happy and I need to concentrate on testing for my project. Maybe I can do something in January on this, as I'm very interested in the cache plugin. I'll probably just follow what you have already done in this respect. If more plugins become available and more flexibility is needed, we can change the API.

Scott

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