Skip to content
Closed
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
10 changes: 5 additions & 5 deletions graphql_server/flask/graphqlview.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,15 @@ def parse_body():
# We use mimetype here since we don't need the other
# information provided by content_type
content_type = request.mimetype
if content_type == "application/graphql":
if "application/graphql" in content_type:
return {"query": request.data.decode("utf8")}

elif content_type == "application/json":
elif "application/json" in content_type:
return load_json_body(request.data.decode("utf8"))

elif content_type in (
"application/x-www-form-urlencoded",
"multipart/form-data",
elif (
"application/x-www-form-urlencoded" in content_type
or "multipart/form-data" in content_type
):
return request.form

Expand Down