In this video Emmanuel Henri updates the schema to be closer to what is used for the project in this course. He also briefly explains the main elements required, such as the schema and the resolvers, in order to be able to do queries in GraphQL.
- [Lecturer] To be able to make graph QL queries…you need to define a schema…which defines the query type…and resolver for each api input.…So type definition provides what type of data we expect…and the resolver gets the data for us.…So we'll get started by defining our friend's type…for application and then resolve it…with fake data for now.…Alright!…So the first thing, let's go in…the schema.js.…So if you don't have it open…just click on schema.js here…and we'll change a little bit of our schema.…
So the first thing I want to do is…keep the type query…but change the hello to friend…and then we expect to return a Friend,…but right now if we do that…it's not going to work…because we haven't defined…what a friend type is yet.…So let's go ahead and do that!…So, the type Friend…and we use the same approach as our query.…Takes an id…We also need to have our first name…which we expect the String,…we'll do the last name again for String…and gender will expect a String for now.…
We'll change that in a couple of videos.…Language will expect also String.…
- 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
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.