Skip to content

Commit

Permalink
Fixed typing on extract_data_from_request method (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
DamianCzajkowski authored Jun 13, 2024
1 parent c63477b commit 1a665e3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions ariadne/asgi/handlers/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 1a665e3

Please sign in to comment.