How Subscription Transport Works

GraphQL subscriptions commonly use a persistent transport such as WebSockets. The client establishes a connection and subscribes to one or more events. When an event is published, the server sends the corresponding GraphQL payload to subscribed clients.

The GraphQL subscription defines the shape of the data delivered to the client, while the underlying transport is responsible for maintaining communication.