-
-
Notifications
You must be signed in to change notification settings - Fork 431
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
Better guard ergonomics #536
Comments
Oh also having to import |
Because of the limitation of procedural macros, I haven't thought of a better way to remove this annoying empty parentheses. 🙂 |
Ah, damn, that's understandable then, what about supporting paths instead of just an ident tho? 🐼 |
It should work, I am trying. |
I have implemented it on the master branch. 🙂 |
You're the best! Thanks! |
I've started using guards in my codebase and it would be nice if they could be a little more flexible.
Things I found a bit annoying so far:
path
instead of an ident so I can fully/partially scope guards instead of having to import them.What I'm going for is something like this:
#[graphql(guard(guard::Session))]
Instead of:
#[graphql(guard(SessionGuard()))]
Thanks!
The text was updated successfully, but these errors were encountered: