Listen to live resource mutation events over WebSockets using the modern graphql-ws protocol. Stream new blog posts, discussion comments, and task modifications instantaneously.

Client tests operation definition to route HTTP (queries) vs WebSocket (subscriptions).
REST & GraphQL mutations publish typed events (postAdded, commentAdded) to channel topics.
Pushes filtered real-time GraphQL query payloads down to active WebSocket subscribers.
Select a subscription channel, connect the live WebSocket socket, or simulate trigger events:
Playground API adheres to the official W3C subprotocol graphql-transport-ws:
Client connects via WebSocket and transmits credentials in payload.
Gateway acknowledges the subprotocol and confirms readiness for subscription requests.
Client sends subscription query document and assigns a unique client operation ID.
Server broadcasts mutation events matching the active channel in full JSON format.
Pre-configured subscription channels available on the Playground API GraphQL gateway:
| Topic Name | Filter Parameters | Trigger Action | Emitted Entity |
|---|---|---|---|
| postAdded | None (Global stream) | Fires whenever any new post is created via REST or GraphQL mutation. | Post |
| commentAdded | postId / post_id: ID | Fires when a comment is attached to a post (filterable by target postId). | Comment |
| todoUpdated | userId / user_id: ID | Fires on checklist task creation, title change, or completion status toggles. | Todo |
| customRecordMutated | collection: String | Streams real-time updates across dynamic developer custom collections. | CustomRecord |
Recommended implementations for full-duplex GraphQL WebSocket subscriptions: