Skip to content

Commit 0e507d7

Browse files
committed
Fix ide rendering
1 parent c7788cb commit 0e507d7

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

src/graphql_server/http/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def should_render_graphql_ide(self, request: BaseRequestProtocol) -> bool:
3131
and request.query_params.get("query") is None
3232
and any(
3333
supported_header in request.headers.get("accept", "")
34-
for supported_header in ("text/html", "*/*")
34+
for supported_header in ("text/html",)
3535
)
3636
)
3737

src/tests/http/test_graphql_ide.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,12 @@
66
from .clients.base import HttpClient
77

88

9-
@pytest.mark.parametrize("header_value", ["text/html", "*/*"])
9+
@pytest.mark.parametrize(
10+
"header_value",
11+
[
12+
"text/html",
13+
],
14+
)
1015
@pytest.mark.parametrize(
1116
"graphql_ide_and_title",
1217
[
@@ -44,7 +49,12 @@ async def test_renders_graphql_ide(
4449
assert "unpkg.com/graphiql" in response.text
4550

4651

47-
@pytest.mark.parametrize("header_value", ["text/html", "*/*"])
52+
@pytest.mark.parametrize(
53+
"header_value",
54+
[
55+
"text/html",
56+
],
57+
)
4858
async def test_renders_graphql_ide_deprecated(
4959
header_value: str, http_client_class: type[HttpClient]
5060
):

0 commit comments

Comments
 (0)