When we started implementing Apollo in our stack, I explained how to set it up manually. As an alternative, there is the apollo-boost package, which does this for you automatically. We have now reached a point where this package cannot be used anymore since subscriptions are an advanced feature that isn't supported. If you rely on the apollo-boost package, take a look at Chapter 4, Integrating React into the Back end with Apollo, to see how to switch to a manual setup.
You can find an excellent overview and more details about Apollo Subscriptions in the official documentation at https://www.apollographql.com/docs/react/advanced/subscriptions.html.
The first step is to install all the required packages to get GraphQL subscriptions working. Install them using npm:
npm install --save graphql-subscriptions subscriptions-transport-ws apollo-link-ws
The following...