December 2019
Intermediate to advanced
474 pages
10h 3m
English
To use subscriptions in your React Native application, there are more packages you need to add to the project that, for example, make it possible to add the WebSocket. These packages are as follows:
npm install apollo-link-ws subscriptions-transport-ws apollo-utilities
The apollo-link-ws package helps you create a link to the GraphQL server running the subscription, like apollo-link-http does for queries and mutations. subscriptions-transport-ws is a package that is needed to run apollo-link-ws, while apollo-utilities is added to use a method that is available on those packages so that you can separate requests regarding subscriptions from requests for queries or mutations.
After installing ...
Read now
Unlock full access