INNER CODE UNIT · Python
receive_next
psevensas/DjangoChannelsGraphqlWs · channels_graphql_ws/client.py:106
async def receive_next(self, op_id):
"""Receive GraphQL message "next" ("data" for "graphql-ws").
Args:
op_id: Subscribe message ID, in response to which the
next/data message should be sent.
Returns:
The `payload` field of the message received.
"""
msg_type = "next" if self._subprotocol == "graphql-transport-ws" else "data"
return await self.receive(assert_id=op_id, assert_type=msg_type)
async def receive_complete(self, op_id):
"""Receive GraphQL complete message.
Args:
op_id: Subscribe message ID, in response