Hello, is there a way to define a parametric dependency injection based on some of the query/mutation variables?
Eg. something like
def custom_context_dependency(name: str) -> str:
return name
async def get_context(
custom_value=Depends(custom_context_dependency),
):
return {
"custom_value": custom_value,
}
@strawberry.type
class Query:
@strawberry.mutation
def example(self, name: str, info: Info) -> str:
return f"Hello {info.context['custom_value']}"
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too