Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typing on extract_data_from_request method #1186

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading