From 01d6a70d24fff0daf132ba40b91a960e3237dda8 Mon Sep 17 00:00:00 2001 From: Choongkyu Kim Date: Mon, 5 Sep 2022 22:58:51 -0700 Subject: [PATCH] - update calls to quart.request.get_data to align with current signature - add generated virtualenv to gitignore --- .gitignore | 3 +++ graphql_server/quart/graphqlview.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index bfac963..defe3e5 100644 --- a/.gitignore +++ b/.gitignore @@ -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 diff --git a/graphql_server/quart/graphqlview.py b/graphql_server/quart/graphqlview.py index ff737ec..84c99a1 100644 --- a/graphql_server/quart/graphqlview.py +++ b/graphql_server/quart/graphqlview.py @@ -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":