From the course: Learning Apollo

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Introduction to subscriptions and schema

Introduction to subscriptions and schema

From the course: Learning Apollo

Start my 1-month free trial

Introduction to subscriptions and schema

- [Narrator] In most applications nowadays we need to have instant updates of the data, such as messaging apps, for example. Subscriptions use a pub sub approach where the reading side of the application is subscribed to the data and as soon as it changes it updates your UI. Therefore the site that sends the new data publishes it. It's another way to get interactive data updated on the fly. Let's implement this. So the first thing I want you to do is open the package.json file so we can take a look at the dependencies that we have. We need to add a few. So open your terminal. So you go to view. Click on integrated terminal and then stop your server, control C, and let's keep our dependencies in view so we make sure that we everything we need. So the dependencies that we need are subscriptions related. So, the first one that we need to do, so you can do MPM install or there's a short way to do that, is MPM I. Whichever way you like. Make sure you save them and we need a few. So the…

Contents