Practice English vocabulary for GraphQL subscriptions: real-time updates, WebSocket connections, subscription filters, and lifecycle management.
0 / 5 completed
1 / 5
What does 'the client subscribes to real-time updates' mean in GraphQL?
GraphQL subscriptions allow clients to receive server-pushed updates. Unlike queries (one request, one response), a subscription keeps a connection open and the server sends new data whenever relevant events occur.
2 / 5
Why do 'subscriptions run over WebSocket'?
GraphQL subscriptions need a persistent connection so the server can push updates without the client polling. WebSocket (or newer alternatives like Server-Sent Events or HTTP/2 streaming) provides this persistent channel.
3 / 5
What does 'the subscription fires when the data changes' mean?
A subscription resolver listens for specific domain events (new database record, published event, etc.) and pushes the updated data to all active subscribers. The subscription 'fires' means the resolver emits an update to subscribers.
4 / 5
What does 'the subscription filter limits events to relevant data' mean?
Subscription filters allow fine-grained subscriptions. For example, a client might subscribe to 'orderStatusChanged(orderId: 42)' — they only receive updates for order 42, not all order updates. This reduces unnecessary network traffic.
5 / 5
Why is 'unsubscribing when the component unmounts' important?
In component-based UIs (React, Vue), when a component using a subscription is destroyed, the subscription must be explicitly cancelled. Otherwise the WebSocket connection remains open, consuming server and client resources and potentially causing memory leaks.