We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c0f9e4 commit 9e9fe5eCopy full SHA for 9e9fe5e
RELEASE.md
@@ -0,0 +1,4 @@
1
+Release type: patch
2
+
3
+This release adjusts the `context_getter` attribute from the fastapi `GraphQLRouter`
4
+to accept an async callables.
strawberry/fastapi/router.py
@@ -125,7 +125,9 @@ def __init__(
125
keep_alive_interval: float = 1,
126
debug: bool = False,
127
root_value_getter: Optional[Callable[[], RootValue]] = None,
128
- context_getter: Optional[Callable[..., Optional[Context]]] = None,
+ context_getter: Optional[
129
+ Callable[..., Union[Optional[Context], Awaitable[Optional[Context]]]]
130
+ ] = None,
131
subscription_protocols: Sequence[str] = (
132
GRAPHQL_TRANSPORT_WS_PROTOCOL,
133
GRAPHQL_WS_PROTOCOL,
0 commit comments