Skip to content

Commit

Permalink
(fix) fastapi: context_getter signature to allow Awaitable
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-pelykh committed Feb 1, 2025
1 parent 7ba5928 commit 6889e9a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Release type: patch

(fix) fastapi: context_getter signature to allow Awaitable
4 changes: 3 additions & 1 deletion strawberry/fastapi/router.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,9 @@ def __init__(
keep_alive_interval: float = 1,
debug: bool = False,
root_value_getter: Optional[Callable[[], RootValue]] = None,
context_getter: Optional[Callable[..., Optional[Context]]] = None,
context_getter: Optional[
Callable[..., Union[Optional[Context], Awaitable[Optional[Context]]]]
] = None,
subscription_protocols: Sequence[str] = (
GRAPHQL_TRANSPORT_WS_PROTOCOL,
GRAPHQL_WS_PROTOCOL,
Expand Down

0 comments on commit 6889e9a

Please sign in to comment.