Tag: python-asyncio
-
condensing an async method into a one liner
0 I’m working on some async code for subscriptions / web sockets and have the following code after some effort. This in itself is functional. @type(name="Subscription") class ContactsSubscription: @subscription async def company(self, info: Info, pk: str) -> AsyncGenerator[CompanyType, None]: async for i in model_subscribe_publisher(info=info, pk=pk, model=Company): yield i The part where I’m struggling is discovering…
-
Python / asyncio: How to test GraphQL subscriptions?
0 I have created a GraphQL API on AWS AppSync and I need to run tests to verify things work as expected. I have implemented a command line API client in Python with gql to interact with the API: I can run queries ✅ I can run mutations ✅ I can start a subscription, run…