diff --git a/CHANGELOG.md b/CHANGELOG.md index 332e6ceb..fd51dbdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - Added validation for directive declarations in `make_executable_schema` to prevent schema creation with undeclared directives. - Replaced hardcoded HTTP statuses with `HTTPStatus` from the `http` stdlib module. - Added `include_cookies` option to the `ExplorerApollo`. +- Fixed typing on `extract_data_from_request` method. ## 0.23 (2024-03-18) diff --git a/ariadne/asgi/handlers/http.py b/ariadne/asgi/handlers/http.py index 7f857467..3fe1a5b4 100644 --- a/ariadne/asgi/handlers/http.py +++ b/ariadne/asgi/handlers/http.py @@ -172,10 +172,10 @@ async def graphql_http_server(self, request: Request) -> Response: success, result = await self.execute_graphql_query(request, data) return await self.create_json_response(request, result, success) - async def extract_data_from_request(self, request: Request): + async def extract_data_from_request(self, request: Request) -> Union[dict, list]: """Extracts GraphQL request data from request. - Returns a `dict` with GraphQL query data that was not yet validated. + Returns a `dict` or `list` with GraphQL query data that was not yet validated. # Required arguments @@ -218,7 +218,7 @@ async def extract_data_from_multipart_request( ) -> Union[dict, list]: """Extracts GraphQL data from `multipart/form-data` request. - Returns an unvalidated `dict` with GraphQL query data. + Returns an unvalidated `dict` or `list` with GraphQL query data. # Required arguments