Eve shows how to query the schema directly. In schema queries, you can observe the types and values required for each field.
- [Woman] In addition to the built-in…documentation in the graphical interface,…you can query the schema directly.…This is particularly useful when we're working…outside of the graphical interface.…So, let's get started by creating a query…and here we're going to look for the __schema field.…From here, we're going to use queryType…and queryType is going to help us drill down…into all the different queries that are part of the schema.…Next, I want to look for the name and the description.…
So, when I click play, we should see…the name is Query and the description is the query root.…This should look familiar because…this is the description of the query root.…Next up, I want to look for fields.…So, fields is going to be another object that…we want to drill down into, we're going…to look for name, as well as description.…So, when I click play, we're…going to see an array of data here.…
We have note, notes, organization, relay,…repository, repositoryOwner, viewer and more.…Notice that these are all of the possible fields…
In this course, learn how to get started with GraphQL. Eve Porcello walks through the basics of this query language, diving into the data fetching specification, and helping you get up to speed with the syntax and vocabulary of GraphQL. Eve explains how to create basic queries, including how to work with arguments and multiple fields. She also goes into complex techniques for handling data, including working with aliases, fragments, and pagination. Plus, she covers how to edit and transform data with mutations.
- Learning about the origins of GraphQL
- Learning about how GraphQL makes data fetching and updating easier
- Creating basic queries
- Using multiple fields
- Understanding schemas
- Handling data
- Drilling down into nested fields with a query
- Adding variables for argument values
- Creating mutations
- Adding a reaction mutation