Rename subscribe method to EXPERIMENTAL_subscribe

This commit is contained in:
Jonathan Kim 2020-07-14 17:45:13 +01:00
parent 64af43748c
commit d69a488d37
2 changed files with 2 additions and 2 deletions

View File

@ -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)

View File

@ -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"]