How does GraphQL handle real-time data and subscriptions?

  • By periodically polling the server for updates
  • By sending email notifications to clients
  • By using RESTful APIs
  • By using WebSockets to establish persistent connections
GraphQL handles real-time data and subscriptions by using WebSockets to establish persistent connections. This allows the server to push updates to clients as soon as new data is available, enabling real-time interaction without the need for frequent polling, which is both inefficient and less responsive in comparison.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *