diff --git a/ci/latest/requirements.txt b/ci/latest/requirements.txt index 64a2277..3beff74 100644 --- a/ci/latest/requirements.txt +++ b/ci/latest/requirements.txt @@ -5,7 +5,7 @@ nextline==0.7.16 apluggy==1.0.1 dynaconf==3.2.6 starlette==0.38.5 -strawberry-graphql==0.239.2 +strawberry-graphql==0.242.0 websockets==13.1 rich==13.8.1 async-asgi-testclient==1.4.11 diff --git a/ci/minimum/requirements.txt b/ci/minimum/requirements.txt index 16ce14a..c576d15 100644 --- a/ci/minimum/requirements.txt +++ b/ci/minimum/requirements.txt @@ -6,7 +6,7 @@ nextline==0.7.15 apluggy==1.0.0 dynaconf==3.2.1 starlette==0.31.0 -strawberry-graphql==0.213.0 +strawberry-graphql==0.240.0 websockets==12.0.0 rich==13.6.0 async-asgi-testclient==1.4.0 diff --git a/pyproject.toml b/pyproject.toml index f861c17..e0c2f38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ dependencies = [ "apluggy>=1.0", "dynaconf>=3.2", "starlette>=0.31", - "strawberry-graphql>=0.213", + "strawberry-graphql>=0.240", "websockets>=12.0", "rich>=13.6", "async-asgi-testclient>=1.4", diff --git a/tests/plugins/ctrl/schema/test_run.py b/tests/plugins/ctrl/schema/test_run.py index c188e76..f12cc34 100644 --- a/tests/plugins/ctrl/schema/test_run.py +++ b/tests/plugins/ctrl/schema/test_run.py @@ -1,8 +1,8 @@ import asyncio +from collections.abc import AsyncIterator from pathlib import Path from typing import Any -from graphql import ExecutionResult as GraphQLExecutionResult from nextline import Nextline from nextline.utils import agen_with_wait from strawberry.types import ExecutionResult @@ -133,13 +133,13 @@ async def _subscribe_continuous_enabled(schema: Schema, context: Any) -> list[bo async def _control_execution(schema: Schema, context: Any) -> None: sub = await schema.subscribe(SUBSCRIBE_TRACE_IDS, context_value=context) - assert not isinstance(sub, GraphQLExecutionResult) + assert isinstance(sub, AsyncIterator) agen = agen_with_wait(sub) prev_ids = set[int]() async for result in agen: - assert isinstance(result, GraphQLExecutionResult) + assert isinstance(result, ExecutionResult) assert (data := result.data) trace_ids: list[int] = data['ctrlTraceIds'] if not (ids := set(trace_ids)): @@ -164,7 +164,7 @@ async def _control_trace(schema: Schema, context: Any, trace_no: int) -> None: context_value=context, variable_values={'traceId': trace_no}, ) - assert not isinstance(sub, GraphQLExecutionResult) + assert isinstance(sub, AsyncIterator) async for result in sub: assert (data := result.data)