In this video, Emmanuel Henri shows how to add new users with mutations. He adds new users and then queries them using the in-memory database he just coded.
- All right, now we're ready to use our mutations,…so let's go ahead and do this.…So the first thing I want you to notice,…and hopefully you restarted your server…and refreshed your browser,…you should see mutation here.…So let's check our documentation.…If you take a look at the query, you'll see that…now getFriend is here, then it takes an id,…and then it will return a friend.…And then if you look at the mutation, you have createFriend…and updateFriend and then it takes the input of the friend,…and this one takes the id that needs to be updated,…and then you paste the Friendinput.…
So let's go ahead and create a new friend.…So I'm going to delete all this…and then type mutation…and then createFriend…and the input will be an object that we'll create.…So the object will have a first name,…which, we'll do Manny.…Then do a last name,…which is Henri.…
Gender.…Language, English.…And then email.…That's not my real email, there you go.…And then what I want to do as well is,…when it does the mutation I want it to return an id.…
- 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.