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

Enhancement: Support dependencies in Guards #1129

Open
provinzkraut opened this issue Feb 1, 2023 · 1 comment
Open

Enhancement: Support dependencies in Guards #1129

provinzkraut opened this issue Feb 1, 2023 · 1 comment
Assignees
Labels
Enhancement This is a new feature or request
Milestone

Comments

@provinzkraut
Copy link
Member

provinzkraut commented Feb 1, 2023

Originally discussed n #1116 (comment)

If we add guards into the dependency graph, it would allow them to receive the same kwargs as dependencies as well, making them more convenient to use since they can opt to receive things such as query params, cookies and headers as needed, without having to go through the ASGIConnection.

Making the same data available in route handlers, dependencies and guards also makes for a better DX imo, since it's a bit more intuitive.


Note

While we are open for sponsoring on GitHub Sponsors and
OpenCollective, we also utilize Polar.sh to engage in pledge-based sponsorship.

Check out all issues funded or available for funding on our Polar.sh dashboard

  • If you would like to see an issue prioritized, make a pledge towards it!
  • We receive the pledge once the issue is completed & verified
  • This, along with engagement in the community, helps us know which features are a priority to our users.
Fund with Polar
@provinzkraut provinzkraut added Enhancement This is a new feature or request Help Wanted 🆘 This is good for people to work on labels Feb 1, 2023
@Goldziher Goldziher removed the Help Wanted 🆘 This is good for people to work on label Feb 3, 2023
@Goldziher Goldziher self-assigned this Feb 3, 2023
@Goldziher
Copy link
Contributor

After looking into this - it will be both complex to do, and will probably degrade performance. I dont think we should proceed with this - the current design is sufficent IMO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement This is a new feature or request
Projects
None yet
Development

No branches or pull requests

2 participants