What Are GraphQL Subscriptions?

Queries retrieve data and mutations change data. Subscriptions allow a client to receive data when a relevant event occurs.

A subscription is useful for features such as chat messages, live notifications, collaborative editing, order-status updates, dashboards, and real-time monitoring.

Unlike a normal request-response query, a subscription represents a long-lived relationship between a client and the server.