We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Bump pytest-aiohttp from 0.3.0 to 1.0.3
Bumps [pytest-aiohttp](https://github.com/aio-libs/pytest-aiohttp) from 0.3.0 to 1.0.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/aio-libs/pytest-aiohttp/blob/master/CHANGES.rst">pytest-aiohttp's changelog</a>.</em></p>
<blockquote>
<h2>1.0.3 (2022-01-03)</h2>
<ul>
<li>Fix <code>loop</code> and <code>proactor_loop</code> fixtures.
<code>[#22](https://github.com/aio-libs/pytest-aiohttp/issues/22) &lt;https://github.com/aio-libs/pytest-aiohttp/issue/22&gt;</code>_</li>
</ul>
<h2>1.0.2 (2022-01-20)</h2>
<ul>
<li>Restore implicit switch to <code>asyncio_mode = auto</code> if <em>legacy</em> mode is detected.</li>
</ul>
<h2>1.0.1 (2022-01-20)</h2>
<ul>
<li>Don't implicitly switch from legacy to auto asyncio_mode, the integration doesn't work
well.</li>
</ul>
<h2>1.0.0 (2022-1-20)</h2>
<ul>
<li>The plugin is compatible with <code>pytest-asyncio</code> now.  It uses <code>pytest-asyncio</code> for
async tests running and async fixtures support, providing by itself only fixtures for
creating aiohttp test server and client.</li>
</ul>
<h2>0.2.0 (2017-11-30)</h2>
<ul>
<li>Fix backward incompatibility changes introduced by <code>pytest</code> 3.3+</li>
</ul>
<h2>0.1.3 (2016-09-08)</h2>
<ul>
<li>Add MANIFEST.in file</li>
</ul>
<h2>0.1.2 (2016-08-07)</h2>
<ul>
<li>Fix README markup</li>
</ul>
<h2>0.1.1 (2016-07-22)</h2>
<ul>
<li>Fix an url in setup.py</li>
</ul>
<h2>0.1.0 (2016-07-22)</h2>
<ul>
<li>Initial release</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/95dbdba5bc9fef5dd634d8a3b38b28e77afe3abe"><code>95dbdba</code></a> Update CHANGES</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/cd25f96b674869dec87c2658f307ce23f021df2c"><code>cd25f96</code></a> Fix fixture loop and proactor_loop (<a href="https://github-redirect.dependabot.com/aio-libs/pytest-aiohttp/issues/22">#22</a>)</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/4f46426126a81ec3d8912edbf1710ab706abd20d"><code>4f46426</code></a> Restore implicit switch to asyncio_mode = auto if legacy mode is detected</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/95d8d45e2e7bcca0336d78d2345eba616639071e"><code>95d8d45</code></a> Drop generated file</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/fa61ad57398a9d79470a30891110d37b5df0a4b5"><code>fa61ad5</code></a> Bump to 1.0.1</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/d0904d6f1a80ba77f84a409856e1eb03a542d64e"><code>d0904d6</code></a> Fix readme</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/84a0aa38fbde6f304453438f6770061d4a9d55c7"><code>84a0aa3</code></a> Tune readme</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/3de013a47a8ff6c1c399499a501c60a1e3175bbd"><code>3de013a</code></a> Make compatible with pytest-asyncio 0.17 (<a href="https://github-redirect.dependabot.com/aio-libs/pytest-aiohttp/issues/19">#19</a>)</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/e22c26502357f40a0ca744aba7017eb474e2889a"><code>e22c265</code></a> Update README.rst</li>
<li><a href="https://github.com/aio-libs/pytest-aiohttp/commit/1fec261bde07ca92762b5992a7c990ba6133776a"><code>1fec261</code></a> Update LICENSE</li>
<li>See full diff in <a href="https://github.com/aio-libs/pytest-aiohttp/compare/v0.3.0...v1.0.3">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-aiohttp&package-manager=pip&previous-version=0.3.0&new-version=1.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `strawberry/aiohttp/handlers/http_handler.py`
Content:
```
1 import json
2 from io import BytesIO
3 from pathlib import Path
4 from typing import Any, Dict
5 
6 from aiohttp import web
7 from strawberry.exceptions import MissingQueryError
8 from strawberry.file_uploads.utils import replace_placeholders_with_files
9 from strawberry.http import GraphQLRequestData, parse_request_data
10 from strawberry.schema import BaseSchema
11 
12 
13 class HTTPHandler:
14     def __init__(
15         self,
16         schema: BaseSchema,
17         graphiql: bool,
18         get_context,
19         get_root_value,
20         process_result,
21         request: web.Request,
22     ):
23         self.schema = schema
24         self.graphiql = graphiql
25         self.get_context = get_context
26         self.get_root_value = get_root_value
27         self.process_result = process_result
28         self.request = request
29 
30     async def handle(self) -> web.StreamResponse:
31         if self.request.method == "GET":
32             return await self.get(self.request)
33         if self.request.method == "POST":
34             return await self.post(self.request)
35         raise web.HTTPMethodNotAllowed(self.request.method, ["GET", "POST"])
36 
37     async def get(self, request: web.Request) -> web.StreamResponse:
38         if self.should_render_graphiql(request):
39             return self.render_graphiql()
40         return web.HTTPNotFound()
41 
42     async def post(self, request: web.Request) -> web.StreamResponse:
43         request_data = await self.get_request_data(request)
44         response = web.Response()
45         context = await self.get_context(request, response)
46         root_value = await self.get_root_value(request)
47 
48         result = await self.schema.execute(
49             query=request_data.query,
50             root_value=root_value,
51             variable_values=request_data.variables,
52             context_value=context,
53             operation_name=request_data.operation_name,
54         )
55 
56         response_data = await self.process_result(request, result)
57         response.text = json.dumps(response_data)
58         response.content_type = "application/json"
59         return response
60 
61     async def get_request_data(self, request: web.Request) -> GraphQLRequestData:
62         data = await self.parse_body(request)
63 
64         try:
65             request_data = parse_request_data(data)
66         except MissingQueryError:
67             raise web.HTTPBadRequest(reason="No GraphQL query found in the request")
68 
69         return request_data
70 
71     async def parse_body(self, request: web.Request) -> dict:
72         if request.content_type.startswith("multipart/form-data"):
73             return await self.parse_multipart_body(request)
74         try:
75             return await request.json()
76         except json.JSONDecodeError:
77             raise web.HTTPBadRequest(reason="Unable to parse request body as JSON")
78 
79     async def parse_multipart_body(self, request: web.Request) -> dict:
80         reader = await request.multipart()
81         operations: Dict[str, Any] = {}
82         files_map: Dict[str, Any] = {}
83         files: Dict[str, Any] = {}
84         try:
85             async for field in reader:
86                 if field.name == "operations":
87                     operations = (await field.json()) or {}
88                 elif field.name == "map":
89                     files_map = (await field.json()) or {}
90                 elif field.filename:
91                     assert field.name
92 
93                     files[field.name] = BytesIO(await field.read(decode=False))
94         except ValueError:
95             raise web.HTTPBadRequest(reason="Unable to parse the multipart body")
96         try:
97             return replace_placeholders_with_files(operations, files_map, files)
98         except KeyError:
99             raise web.HTTPBadRequest(reason="File(s) missing in form data")
100 
101     def render_graphiql(self) -> web.StreamResponse:
102         html_string = self.graphiql_html_file_path.read_text()
103         html_string = html_string.replace("{{ SUBSCRIPTION_ENABLED }}", "true")
104         return web.Response(text=html_string, content_type="text/html")
105 
106     def should_render_graphiql(self, request: web.Request) -> bool:
107         if not self.graphiql:
108             return False
109         return "text/html" in request.headers.get("Accept", "")
110 
111     @property
112     def graphiql_html_file_path(self) -> Path:
113         return Path(__file__).parent.parent.parent / "static" / "graphiql.html"
114
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/strawberry/aiohttp/handlers/http_handler.py b/strawberry/aiohttp/handlers/http_handler.py
--- a/strawberry/aiohttp/handlers/http_handler.py
+++ b/strawberry/aiohttp/handlers/http_handler.py
@@ -37,7 +37,7 @@
     async def get(self, request: web.Request) -> web.StreamResponse:
         if self.should_render_graphiql(request):
             return self.render_graphiql()
-        return web.HTTPNotFound()
+        raise web.HTTPNotFound()
 
     async def post(self, request: web.Request) -> web.StreamResponse:
         request_data = await self.get_request_data(request)

{"golden_diff": "diff --git a/strawberry/aiohttp/handlers/http_handler.py b/strawberry/aiohttp/handlers/http_handler.py\n--- a/strawberry/aiohttp/handlers/http_handler.py\n+++ b/strawberry/aiohttp/handlers/http_handler.py\n@@ -37,7 +37,7 @@\n     async def get(self, request: web.Request) -> web.StreamResponse:\n         if self.should_render_graphiql(request):\n             return self.render_graphiql()\n-        return web.HTTPNotFound()\n+        raise web.HTTPNotFound()\n \n     async def post(self, request: web.Request) -> web.StreamResponse:\n         request_data = await self.get_request_data(request)\n", "issue": "Bump pytest-aiohttp from 0.3.0 to 1.0.3\nBumps [pytest-aiohttp](https://github.com/aio-libs/pytest-aiohttp) from 0.3.0 to 1.0.3.\n<details>\n<summary>Changelog</summary>\n<p><em>Sourced from <a href=\"https://github.com/aio-libs/pytest-aiohttp/blob/master/CHANGES.rst\">pytest-aiohttp's changelog</a>.</em></p>\n<blockquote>\n<h2>1.0.3 (2022-01-03)</h2>\n<ul>\n<li>Fix <code>loop</code> and <code>proactor_loop</code> fixtures.\n<code>[#22](https://github.com/aio-libs/pytest-aiohttp/issues/22) &lt;https://github.com/aio-libs/pytest-aiohttp/issue/22&gt;</code>_</li>\n</ul>\n<h2>1.0.2 (2022-01-20)</h2>\n<ul>\n<li>Restore implicit switch to <code>asyncio_mode = auto</code> if <em>legacy</em> mode is detected.</li>\n</ul>\n<h2>1.0.1 (2022-01-20)</h2>\n<ul>\n<li>Don't implicitly switch from legacy to auto asyncio_mode, the integration doesn't work\nwell.</li>\n</ul>\n<h2>1.0.0 (2022-1-20)</h2>\n<ul>\n<li>The plugin is compatible with <code>pytest-asyncio</code> now.  It uses <code>pytest-asyncio</code> for\nasync tests running and async fixtures support, providing by itself only fixtures for\ncreating aiohttp test server and client.</li>\n</ul>\n<h2>0.2.0 (2017-11-30)</h2>\n<ul>\n<li>Fix backward incompatibility changes introduced by <code>pytest</code> 3.3+</li>\n</ul>\n<h2>0.1.3 (2016-09-08)</h2>\n<ul>\n<li>Add MANIFEST.in file</li>\n</ul>\n<h2>0.1.2 (2016-08-07)</h2>\n<ul>\n<li>Fix README markup</li>\n</ul>\n<h2>0.1.1 (2016-07-22)</h2>\n<ul>\n<li>Fix an url in setup.py</li>\n</ul>\n<h2>0.1.0 (2016-07-22)</h2>\n<ul>\n<li>Initial release</li>\n</ul>\n</blockquote>\n</details>\n<details>\n<summary>Commits</summary>\n<ul>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/95dbdba5bc9fef5dd634d8a3b38b28e77afe3abe\"><code>95dbdba</code></a> Update CHANGES</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/cd25f96b674869dec87c2658f307ce23f021df2c\"><code>cd25f96</code></a> Fix fixture loop and proactor_loop (<a href=\"https://github-redirect.dependabot.com/aio-libs/pytest-aiohttp/issues/22\">#22</a>)</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/4f46426126a81ec3d8912edbf1710ab706abd20d\"><code>4f46426</code></a> Restore implicit switch to asyncio_mode = auto if legacy mode is detected</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/95d8d45e2e7bcca0336d78d2345eba616639071e\"><code>95d8d45</code></a> Drop generated file</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/fa61ad57398a9d79470a30891110d37b5df0a4b5\"><code>fa61ad5</code></a> Bump to 1.0.1</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/d0904d6f1a80ba77f84a409856e1eb03a542d64e\"><code>d0904d6</code></a> Fix readme</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/84a0aa38fbde6f304453438f6770061d4a9d55c7\"><code>84a0aa3</code></a> Tune readme</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/3de013a47a8ff6c1c399499a501c60a1e3175bbd\"><code>3de013a</code></a> Make compatible with pytest-asyncio 0.17 (<a href=\"https://github-redirect.dependabot.com/aio-libs/pytest-aiohttp/issues/19\">#19</a>)</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/e22c26502357f40a0ca744aba7017eb474e2889a\"><code>e22c265</code></a> Update README.rst</li>\n<li><a href=\"https://github.com/aio-libs/pytest-aiohttp/commit/1fec261bde07ca92762b5992a7c990ba6133776a\"><code>1fec261</code></a> Update LICENSE</li>\n<li>See full diff in <a href=\"https://github.com/aio-libs/pytest-aiohttp/compare/v0.3.0...v1.0.3\">compare view</a></li>\n</ul>\n</details>\n<br />\n\n\n[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest-aiohttp&package-manager=pip&previous-version=0.3.0&new-version=1.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)\n\nDependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.\n\n[//]: # (dependabot-automerge-start)\n[//]: # (dependabot-automerge-end)\n\n---\n\n<details>\n<summary>Dependabot commands and options</summary>\n<br />\n\nYou can trigger Dependabot actions by commenting on this PR:\n- `@dependabot rebase` will rebase this PR\n- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it\n- `@dependabot merge` will merge this PR after your CI passes on it\n- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it\n- `@dependabot cancel merge` will cancel a previously requested merge and block automerging\n- `@dependabot reopen` will reopen this PR if it is closed\n- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually\n- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)\n- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)\n\n\n</details>\n", "before_files": [{"content": "import json\nfrom io import BytesIO\nfrom pathlib import Path\nfrom typing import Any, Dict\n\nfrom aiohttp import web\nfrom strawberry.exceptions import MissingQueryError\nfrom strawberry.file_uploads.utils import replace_placeholders_with_files\nfrom strawberry.http import GraphQLRequestData, parse_request_data\nfrom strawberry.schema import BaseSchema\n\n\nclass HTTPHandler:\n    def __init__(\n        self,\n        schema: BaseSchema,\n        graphiql: bool,\n        get_context,\n        get_root_value,\n        process_result,\n        request: web.Request,\n    ):\n        self.schema = schema\n        self.graphiql = graphiql\n        self.get_context = get_context\n        self.get_root_value = get_root_value\n        self.process_result = process_result\n        self.request = request\n\n    async def handle(self) -> web.StreamResponse:\n        if self.request.method == \"GET\":\n            return await self.get(self.request)\n        if self.request.method == \"POST\":\n            return await self.post(self.request)\n        raise web.HTTPMethodNotAllowed(self.request.method, [\"GET\", \"POST\"])\n\n    async def get(self, request: web.Request) -> web.StreamResponse:\n        if self.should_render_graphiql(request):\n            return self.render_graphiql()\n        return web.HTTPNotFound()\n\n    async def post(self, request: web.Request) -> web.StreamResponse:\n        request_data = await self.get_request_data(request)\n        response = web.Response()\n        context = await self.get_context(request, response)\n        root_value = await self.get_root_value(request)\n\n        result = await self.schema.execute(\n            query=request_data.query,\n            root_value=root_value,\n            variable_values=request_data.variables,\n            context_value=context,\n            operation_name=request_data.operation_name,\n        )\n\n        response_data = await self.process_result(request, result)\n        response.text = json.dumps(response_data)\n        response.content_type = \"application/json\"\n        return response\n\n    async def get_request_data(self, request: web.Request) -> GraphQLRequestData:\n        data = await self.parse_body(request)\n\n        try:\n            request_data = parse_request_data(data)\n        except MissingQueryError:\n            raise web.HTTPBadRequest(reason=\"No GraphQL query found in the request\")\n\n        return request_data\n\n    async def parse_body(self, request: web.Request) -> dict:\n        if request.content_type.startswith(\"multipart/form-data\"):\n            return await self.parse_multipart_body(request)\n        try:\n            return await request.json()\n        except json.JSONDecodeError:\n            raise web.HTTPBadRequest(reason=\"Unable to parse request body as JSON\")\n\n    async def parse_multipart_body(self, request: web.Request) -> dict:\n        reader = await request.multipart()\n        operations: Dict[str, Any] = {}\n        files_map: Dict[str, Any] = {}\n        files: Dict[str, Any] = {}\n        try:\n            async for field in reader:\n                if field.name == \"operations\":\n                    operations = (await field.json()) or {}\n                elif field.name == \"map\":\n                    files_map = (await field.json()) or {}\n                elif field.filename:\n                    assert field.name\n\n                    files[field.name] = BytesIO(await field.read(decode=False))\n        except ValueError:\n            raise web.HTTPBadRequest(reason=\"Unable to parse the multipart body\")\n        try:\n            return replace_placeholders_with_files(operations, files_map, files)\n        except KeyError:\n            raise web.HTTPBadRequest(reason=\"File(s) missing in form data\")\n\n    def render_graphiql(self) -> web.StreamResponse:\n        html_string = self.graphiql_html_file_path.read_text()\n        html_string = html_string.replace(\"{{ SUBSCRIPTION_ENABLED }}\", \"true\")\n        return web.Response(text=html_string, content_type=\"text/html\")\n\n    def should_render_graphiql(self, request: web.Request) -> bool:\n        if not self.graphiql:\n            return False\n        return \"text/html\" in request.headers.get(\"Accept\", \"\")\n\n    @property\n    def graphiql_html_file_path(self) -> Path:\n        return Path(__file__).parent.parent.parent / \"static\" / \"graphiql.html\"\n", "path": "strawberry/aiohttp/handlers/http_handler.py"}], "after_files": [{"content": "import json\nfrom io import BytesIO\nfrom pathlib import Path\nfrom typing import Any, Dict\n\nfrom aiohttp import web\nfrom strawberry.exceptions import MissingQueryError\nfrom strawberry.file_uploads.utils import replace_placeholders_with_files\nfrom strawberry.http import GraphQLRequestData, parse_request_data\nfrom strawberry.schema import BaseSchema\n\n\nclass HTTPHandler:\n    def __init__(\n        self,\n        schema: BaseSchema,\n        graphiql: bool,\n        get_context,\n        get_root_value,\n        process_result,\n        request: web.Request,\n    ):\n        self.schema = schema\n        self.graphiql = graphiql\n        self.get_context = get_context\n        self.get_root_value = get_root_value\n        self.process_result = process_result\n        self.request = request\n\n    async def handle(self) -> web.StreamResponse:\n        if self.request.method == \"GET\":\n            return await self.get(self.request)\n        if self.request.method == \"POST\":\n            return await self.post(self.request)\n        raise web.HTTPMethodNotAllowed(self.request.method, [\"GET\", \"POST\"])\n\n    async def get(self, request: web.Request) -> web.StreamResponse:\n        if self.should_render_graphiql(request):\n            return self.render_graphiql()\n        raise web.HTTPNotFound()\n\n    async def post(self, request: web.Request) -> web.StreamResponse:\n        request_data = await self.get_request_data(request)\n        response = web.Response()\n        context = await self.get_context(request, response)\n        root_value = await self.get_root_value(request)\n\n        result = await self.schema.execute(\n            query=request_data.query,\n            root_value=root_value,\n            variable_values=request_data.variables,\n            context_value=context,\n            operation_name=request_data.operation_name,\n        )\n\n        response_data = await self.process_result(request, result)\n        response.text = json.dumps(response_data)\n        response.content_type = \"application/json\"\n        return response\n\n    async def get_request_data(self, request: web.Request) -> GraphQLRequestData:\n        data = await self.parse_body(request)\n\n        try:\n            request_data = parse_request_data(data)\n        except MissingQueryError:\n            raise web.HTTPBadRequest(reason=\"No GraphQL query found in the request\")\n\n        return request_data\n\n    async def parse_body(self, request: web.Request) -> dict:\n        if request.content_type.startswith(\"multipart/form-data\"):\n            return await self.parse_multipart_body(request)\n        try:\n            return await request.json()\n        except json.JSONDecodeError:\n            raise web.HTTPBadRequest(reason=\"Unable to parse request body as JSON\")\n\n    async def parse_multipart_body(self, request: web.Request) -> dict:\n        reader = await request.multipart()\n        operations: Dict[str, Any] = {}\n        files_map: Dict[str, Any] = {}\n        files: Dict[str, Any] = {}\n        try:\n            async for field in reader:\n                if field.name == \"operations\":\n                    operations = (await field.json()) or {}\n                elif field.name == \"map\":\n                    files_map = (await field.json()) or {}\n                elif field.filename:\n                    assert field.name\n\n                    files[field.name] = BytesIO(await field.read(decode=False))\n        except ValueError:\n            raise web.HTTPBadRequest(reason=\"Unable to parse the multipart body\")\n        try:\n            return replace_placeholders_with_files(operations, files_map, files)\n        except KeyError:\n            raise web.HTTPBadRequest(reason=\"File(s) missing in form data\")\n\n    def render_graphiql(self) -> web.StreamResponse:\n        html_string = self.graphiql_html_file_path.read_text()\n        html_string = html_string.replace(\"{{ SUBSCRIPTION_ENABLED }}\", \"true\")\n        return web.Response(text=html_string, content_type=\"text/html\")\n\n    def should_render_graphiql(self, request: web.Request) -> bool:\n        if not self.graphiql:\n            return False\n        return \"text/html\" in request.headers.get(\"Accept\", \"\")\n\n    @property\n    def graphiql_html_file_path(self) -> Path:\n        return Path(__file__).parent.parent.parent / \"static\" / \"graphiql.html\"\n", "path": "strawberry/aiohttp/handlers/http_handler.py"}]}