In this video, Emmanuel Henri continues adding code to be able to do mutations with GraphQL. He now adds resolvers on the server-side code along with defining an in-memory DB to be able to test them.
- [Instructor] Let's continue coding our mutations…by adding resolvers on the server side.…So the first thing I want you to do…is go to this server.js file…and then what we'll do is add,…right after the app.get, a class.…So let's go ahead and create a class called Friend…which we'll reuse to create objects in our resolvers.…So let's go ahead and do constructor…and constructor takes an ID…and then input of firstName, lastName, gender,…language, and email, like so.…
And then this class will take the values…and create a new object with ID.…so let's go ahead and copy and paste that particular line.…So we don't have to retype every single time, so paste,…click and option click to select the second one…and then do first name, paste,…click and Option click, last name.…
so if you can guess pretty much what we're going to type after…feel free to go ahead and pause or fast forward…and do the rest on your own.…So this is what I'm hoping will happen…that means that I'm doing a good job as a teacher.…Okay, so last one, email.…
- Setting up GraphQL
- Running queries
- Updating schema and solvers
- Adding data
- Adding Relay entry components
- Coding GraphQL fragments
Skill Level Intermediate
Node.js: Build Your First Microservicewith Daniel Khan2h 9m Intermediate
1. Introduction and Setup
2. GraphQL Development
3. Relay Setup
4. React Integration
Next steps1m 12s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.