Skip to content

Commit df01ef1

Browse files
committed
Make more tests pass
1 parent dd72f96 commit df01ef1

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

src/graphql_server/http/async_base_view.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,11 @@ async def run(
350350
):
351351
raise HTTPException(400, "Variables must be a JSON object")
352352

353+
if request_data.extensions is not None and not isinstance(
354+
request_data.extensions, dict
355+
):
356+
raise HTTPException(400, "Extensions must be a JSON object")
357+
353358
allowed_operation_types = operation_type_from_http(request_adapter.method)
354359

355360
if request_adapter.method == "GET":

src/graphql_server/http/sync_base_view.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,11 @@ def run(
212212
):
213213
raise HTTPException(400, "Variables must be a JSON object")
214214

215+
if request_data.extensions is not None and not isinstance(
216+
request_data.extensions, dict
217+
):
218+
raise HTTPException(400, "Extensions must be a JSON object")
219+
215220
allowed_operation_types = operation_type_from_http(request_adapter.method)
216221

217222
if request_adapter.method == "GET":

src/tests/http/test_graphql_over_http_spec.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -455,9 +455,6 @@ async def test_6a70(http_client):
455455
assert "errors" not in response.json
456456

457457

458-
@pytest.mark.xfail(
459-
reason="OPTIONAL - Currently not supported by GraphQL-Server", raises=AssertionError
460-
)
461458
@pytest.mark.parametrize(
462459
"invalid",
463460
["string", 0, False, ["array"]],

0 commit comments

Comments
 (0)