Homepage

channel_send_message

Last edit: Nov 01, 2026

Sends a message to every WebSocket client subscribed to the given channel and
room, without running the channel's receive partial. Returns "dispatched"

channel_send_message(
  channel_name: String!
  payload: JSONPayload!
  room_id: String!
): String

Arguments

channel_name (String)

Name of the channel, as used by subscribing clients

payload (JSONPayload)

Message sent to the subscribers, as any JSON value

room_id (String)

ID of the room within the channel

Type

String

The String scalar type represents textual data, represented as UTF-8 character sequences. The String type is most often used by GraphQL to represent free-form human-readable text.

Questions?

We are always happy to help with any questions you may have.

contact us