-
Notifications
You must be signed in to change notification settings - Fork 575
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
New Feature: Pluggable Middleware (for AAA among other) #20
Comments
I think there is a good example about authentication via directives: https://github.com/chenkie/graphql-auth |
interesting... I was about to propose yoga-middlewares, but obviously implementing authentication via the resolvers is another option. I guess, it depends if yoga is a lean or fullstack framework. |
Went over your code... then found this issue chenkie/graphql-auth#2 This leads me to believe that yoga could benefit from a better middleware implementation, in fact something like this https://github.com/scaphold-io/graphql-extended/blob/master/src/middleware/Middleware.ts which allows the implementation of any type of middleware, not just AAA |
@orefalo: We can create two directives like |
@giautm I would gladly look at some samples ;-) No idea how to get it done. |
Actually found this project, which seems to be in perfect alignment https://github.com/thebigredgeek/apollo-resolvers Video's really good |
@orefalo: i have tried |
I opened PR at here to bring it to Directive can use as before & after resolver middlewares :D. |
Hey! That PR really merged and release with version 2.13.0. So we can close this issues |
cool! thank you @giautm |
@giautm would be great if you could create a PR with a new example application using this feature 🎉 |
Hey, @Urigo from The Guild here! You might know us from projects such as graphql-code-generator, envelop or graphql-tools. For a long time we thought that the Javascript ecosystem is still missing a lightweight cross-platform, but still highly customizable GraphQL Server. In the past the awesome Prisma team took on that great challenge and now we are happy to announce that we are continuing them and just released GraphQL Yoga 2.0 - Build fast, extensible, and batteries-included (Subscriptions, Serverless, File uploads support) GraphQL APIs in Node.js 🚀 And regarding the issue here, Yoga uses the Envelop plugin system under the hood which has integrations and plugins and hooks that are more powerful then GraphQL Middleware. We have been working a long time on version 2.0 and have been using it in our clients projects for a few months now and shared a couple of alpha cycles here. Please try Yoga out again, give us feedback and help us spread the word on the new release! |
This would be a great nice to have,
and it could narrow to something as simple as hooks during the instantiation of the express server.
The text was updated successfully, but these errors were encountered: