Sign up for Hasura Newsletter

Apollo useSubscription hook

The easiest way to bring live data to your UI is using the useSubscription hook from @apllo/react-hooks. This lets you render the stream of data from your service directly within your component! One thing to note, subscriptions are just listeners, they don’t request any data when first connected, but only open up a connection to get new data.

Did you find this page helpful?
Start with GraphQL on Hasura for Free
  • ArrowBuild apps and APIs 10x faster
  • ArrowBuilt-in authorization and caching
  • Arrow8x more performant than hand-rolled APIs
Promo
footer illustration
Brand logo
© 2021 Hasura Inc. All rights reserved
Github
Titter
Discord
Facebook
Instagram
Youtube
Linkedin