Skip to content

Update calls to quart.request.get_data to align with current signature address issue #94 #95

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

Closed
wants to merge 1 commit into from
Closed
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -204,4 +204,7 @@ dmypy.json
# Ignore all local history of files
.history

# Virtualenv generated per CONTRIBUTING.md
graphql-server-dev

# End of https://www.gitignore.io/api/python,intellij+all,visualstudiocode
4 changes: 2 additions & 2 deletions graphql_server/quart/graphqlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ async def parse_body():
# information provided by content_type
content_type = request.mimetype
if content_type == "application/graphql":
refined_data = await request.get_data(raw=False)
refined_data = await request.get_data(cache=True, as_text=True, parse_form_data=False)
return {"query": refined_data}

elif content_type == "application/json":
refined_data = await request.get_data(raw=False)
refined_data = await request.get_data(cache=True, as_text=True, parse_form_data=False)
return load_json_body(refined_data)

elif content_type == "application/x-www-form-urlencoded":
Expand Down