GraphQL Subscriptions
GraphQL's third operation type — push of real-time data from server to client via WebSocket or SSE. Alongside queries and mutations.
Definition: subscription { messageAdded { id text } }. Server pushes the payload when the event fires. Transport: graphql-ws (WebSocket, the modern standard) or graphql-sse (Server-Sent Events, easier with HTTP/2). A pub/sub broker is often needed (Redis Pub/Sub, Kafka, PostgreSQL NOTIFY). Hasura/Supabase expose DB changes as GraphQL Subs automatically. Use cases: chat, live dashboards, multiplayer. Alternatives: livequeries (Relay), polling, plain SSE.