Chapter 5: Adding Realtime Support with Apollo Server

In the previous chapter, we saw how to add authentication and image uploading to our GraphQL API. We've also seen how to protect endpoints from access by non-authenticated users.

Traditionally, in web applications, clients send HTTP requests to servers and receive the response. After that, the connection gets closed. As a result, if the data on the server is changed, the client doesn't have the mechanism to know that.

Nowadays, contemporary apps operate in real time, which means that the backend server can alert clients anytime data changes, even if they do not send another request, because the connection remains open to allow the server to transmit updates whenever they become available. ...

Get Full Stack Development with Angular and GraphQL now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.