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.
In this chapter, we'll add realtime support to our server application, which will allow us to communicate fresh data from the server to the client as soon as it becomes available. To do this, we'll leverage Apollo Server...