1. 22
    Subscribe to immediate live updates from your server
    7m 56s

Subscribe to immediate live updates from your server

Share this video with your friends

Send Tweet

While polling for changes is a simple, safe solution, sometimes we'd like updates pushed to us by the server as soon as they happen. We might also like small chunks of updates, rather than re-requesting the whole initial query. In this lesson, we'll look at making GraphQL subscription with the "useSubscription" hook. We'll also set-up a conditional protocol link, that either uses the HTTP or Websocket protocols based on the type of query being attempted.