Real Time for GraphQLs
Real-time GraphQL uses subscriptions, an operation type where the server pushes new results to a client whenever an event occurs, commonly over WebSockets. This unit also covers schema evolution, meaning how to change a live schema safely by adding fields and deprecating old ones rather than breaking existing clients.
Stage: Server · Part of the GraphQL roadmap · Last reviewed 19 November 2026
What to learn in Real Time
- Write a subscription that streams new messages to a client
- Publish events from a mutation to subscribers using a pub/sub mechanism
- Explain how WebSocket connections carry subscription operations
- Mark a field with the deprecated directive and give a reason
- Decide which schema changes are breaking and which are safe
Real Time interview questions
How do GraphQL subscriptions work?
A client sends a subscription operation over a long-lived connection, usually WebSocket. The server keeps it open and, when a relevant event is published, runs the selection set and sends the result. The client receives a stream of responses instead of one.
How do you evolve a GraphQL schema without versioning the API?
Add new fields and types freely, since clients only ask for what they know. Mark old fields as deprecated, track their usage, and remove them only once no client queries them. Renaming or changing a field type is a breaking change.
Where Real Time fits in the GraphQL roadmap
Real Time belongs to the Server stage (intermediate level), which takes about 13 hours. Build the API.
Other units in this stage
Back to the full GraphQL roadmap