mirror of
https://github.com/graphql-python/graphene.git
synced 2024-11-22 01:26:49 +03:00
Rename subscribe method to EXPERIMENTAL_subscribe
This commit is contained in:
parent
64af43748c
commit
d69a488d37
|
@ -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)
|
||||
|
|
|
@ -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"]
|
||||
|
|
Loading…
Reference in New Issue
Block a user