All quizzes
Free quiz · 19 questions in the bank

GraphQL Subscriptions quiz

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
  1. 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?
  2. 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?
  3. How do you declare a subscription in a GraphQL schema?
  4. 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?
  5. How does a client subscribe to a GraphQL subscription using Apollo Client?
  6. 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?
  7. What is the relationship between a GraphQL mutation and a subscription in a typical realtime feature implementation (e.g. a chat app)?
  8. What transport does a GraphQL Subscription typically use, unlike a query or mutation?
  9. Why is scaling GraphQL Subscriptions across multiple server instances more complex than scaling queries/mutations?
  10. 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?
  11. 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)?
  12. What does a subscription resolver typically return, as distinct from a query resolver?
Gaps to close?
Read the curated GraphQL Subscriptions notes — core concepts, patterns, interview prep.
GraphQL Subscriptions notes

More quizzes

.NETAccessibilityAgileAgile MethodologyAirflowAkka