Test your GraphQL Subscriptions knowledge with a free interactive quiz — 19 questions with answers and explanations. No signup needed to play.
Question 1/12Score 0
Why might a subscription that never properly cleans up its server-side resources when a client disconnects (e.g. forgetting to unsubscribe an async iterator from a PubSub topic) cause a memory leak over time?
In this round
Why might a subscription that never properly cleans up its server-side resources when a client disconnects (e.g. forgetting to unsubscribe an async iterator from a PubSub topic) cause a memory leak over time?
What is a "live query" and how does it conceptually differ from a GraphQL Subscription, even though both aim to keep client data up to date?
How do you declare a subscription in a GraphQL schema?
What is a reasonable way to test a subscription resolver's behavior in an automated test, given that it involves an asynchronous, ongoing stream rather than a single return value?
How does a client subscribe to a GraphQL subscription using Apollo Client?
What does it mean for a subscription to be "long-lived" from a server resource-management perspective, and why does this matter when deciding how many subscription types to support in a schema?
What is the relationship between a GraphQL mutation and a subscription in a typical realtime feature implementation (e.g. a chat app)?
What transport does a GraphQL Subscription typically use, unlike a query or mutation?
Why is scaling GraphQL Subscriptions across multiple server instances more complex than scaling queries/mutations?
How does authentication typically work for a GraphQL Subscription's WebSocket connection, given that WebSocket connections don't naturally carry the same headers as a standard HTTP request on every message?
What is a practical trade-off of using GraphQL Subscriptions for realtime updates compared to client-side polling (repeatedly re-running a query on an interval)?
What does a subscription resolver typically return, as distinct from a query resolver?