In this video Emmanuel Henri demonstrates how to do a simple query with GraphQL and query the SQL database created with Sequelize and SQLite3.
- [Instructor] Now that we have some data to play with,…it's time to explore the many options available with queries…and start with a simple one…leveraging the SQL database we created.…Let's get to it.…Let's go into our schema again, here,…so if you don't have it open, click on schema.js here.…Then instead of Mutation, let's go up to Queries here,…then I want you to add one more query,…so hit Return on there, and do getAliens,…and what we'll return is an array of Alien,…and by now we should have Alien also defined,…so the type Alien is here, so we're good to go there.…
If you don't,…please make sure that you refer back to that video…or just look at the exercise files,…but this particular type needs to be in here.…Whenever you have any type or Queries or Mutations…that are actually returning something,…so our Friend are returning…on the rate of a particular type,…you need to make sure that you have that type…defined somewhere in your schema.…For example, we have the type Alien defined here,…we have the type Friend defined here.…
- 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.