Skip to content

Router Level Dependencies are not injected #11527

Discussion options

You must be logged in to vote

FastAPI doesn't save solved results of router-level dependencies. So, you can't access these results.
Here is a related part of FastAPI sources:

async def solve_dependencies(

If you need to use the result of dependency, you should include this dependency as a parameter of endpoint function

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ilterisYucel
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants