INNER CODE UNIT · Python

subscribe

psevensas/DjangoChannelsGraphqlWs · channels_graphql_ws/client.py:189

    async def subscribe(self, query, *, variables=None, wait_confirmation=True):
        """Execute subscription request and wait for the confirmation.

        Args:
            query: A GraphQL string query. We `dedent` it, so you do not
                have to.
            variables: Dict of variables (optional).
            wait_confirmation: If `True` wait for the subscription
                confirmation message.

        Returns:
            The message identifier.

        """
        msg_id = await self.start(query, variables=variables)
        if wait_confirmation:
            await self.receive(wait_id=msg_id)
        return msg_id

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…