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.
Add new contact header component
- [Instructor] So we need to create a component that will be used primarily to query GraphQL and password contact ID props so we can get our list of nodes for that user. And we also need that to be the title of the main page where we're going to have the list of nodes for that user. So this is the contact header here. So let's go ahead and code this. So the first thing I want you to do for contact header is import, again, GraphQL, and let's go ahead and pull and copy from this one here, like so. Paste it. All right, so what we're going to pass instead of props here, we're going to pass data and we're going to pass, like we did with contacts, actually, very similar. So let's go ahead and copy that, like so, and paste it here, and instead of contacts, we're passing a contact. And then we're going to do a lot of these same error states here. So let's go ahead and take a look at what we got here, so we'll use most of this, actually. So let's paste it here, like so. So basically, for…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Introduction to subscriptions and schema9m 18s
-
(Locked)
Update resolvers for subscriptions10m 22s
-
(Locked)
Update components for subscriptions9m 6s
-
(Locked)
Create a custom resolver on client6m 2s
-
(Locked)
Add new contact header component5m 14s
-
(Locked)
Connect subscription with contact single14m 18s
-
(Locked)
Adding new notes with mutations15m 47s
-
(Locked)
Finalizing project with a beauty pass12m 13s
-
(Locked)
-