Skip to content

Commit

Permalink
Implement the send_xjson abstract method defined in parent class
Browse files Browse the repository at this point in the history
This abstract method is defined in BaseGraphQLTransportWSHandler and is used
instead of `send_json` like in graphql_ws protocol implementation.
  • Loading branch information
ayys committed Dec 3, 2023
1 parent 792777e commit 08b676f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions graphql_server/channels/graphql_transport_ws.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ async def get_root_value(self) -> Any:
async def send_json(self, data: dict) -> None:
await self._ws.send_json(data)

async def send_xjson(self, data: dict) -> None:
await self._ws.send_json(data)

async def close(self, code: int = 1000, reason: Optional[str] = None) -> None:
# Close messages are not part of the ASGI ref yet
await self._ws.close(code=code)
Expand Down

0 comments on commit 08b676f

Please sign in to comment.