In this video Emmanuel Henri introduces query and mutation types and their role into the GraphQL environment. Then he demonstrates an example of both through code.
- [Instructor] Queries and mutations are the basis…of running operations in a GraphQL environment,…and we'll explore each type.…First, you have queries,…which we already coded one for our friend type.…The query type is responsible…for defining what will return when we make the query.…In this case, we are querying a friend type…and therefore, when we run the query,…it will return a friend…or multiple friends based on the query.…And this is what you're looking at on the screen.…Next we have mutations,…which is basically GraphQL's way of changing data,…updating, or creating new data,…so let's add a mutation type to our project.…
Let's go to VS Code, and the first thing I want to do we…is just remove the emails here…and just make it a simple string.…And then let's remove the type Email here.…I want to make sure that this is as simple as it gets…while you're learning this.…And I'll remove any complexities for now.…Okay, so the next thing we need to create…is a type mutation,…so just go below the type Query here…and create the type Mutation.…
- Basic GraphQL schema
- Object types and fields
- Role of the resolver in GraphQL
- Scalar and enumeration types
- Using GraphQL tools
- Setting up persistence
- Adding new items with mutations
- Updating and deleting items with mutations
- Queries with arguments, aliases, and fragments
Skill Level Intermediate
GraphQL: Data Fetching with Relaywith Emmanuel Henri2h 28m Advanced
1. Setup and Introduction
2. Types and Schemas
3. Setting Up Persistence
5. Queries in Depth
Next steps1m 8s
- 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.