diff --git a/graphene/types/schema.py b/graphene/types/schema.py index ce0c7439..4a77c9fc 100644 --- a/graphene/types/schema.py +++ b/graphene/types/schema.py @@ -475,7 +475,7 @@ class Schema: kwargs = normalize_execute_kwargs(kwargs) return await graphql(self.graphql_schema, *args, **kwargs) - async def subscribe(self, query, *args, **kwargs): + async def EXPERIMENTAL_subscribe(self, query, *args, **kwargs): document = parse(query) kwargs = normalize_execute_kwargs(kwargs) return await subscribe(self.graphql_schema, document, *args, **kwargs) diff --git a/tests_asyncio/test_subscribe.py b/tests_asyncio/test_subscribe.py index bf985d58..e86efb1d 100644 --- a/tests_asyncio/test_subscribe.py +++ b/tests_asyncio/test_subscribe.py @@ -26,7 +26,7 @@ schema = Schema(query=Query, subscription=Subscription) @mark.asyncio async def test_subscription(): subscription = "subscription { countToTen }" - result = await schema.subscribe(subscription) + result = await schema.EXPERIMENTAL_subscribe(subscription) count = 0 async for item in result: count = item.data["countToTen"]