Connections represent relationships from one field to another object. When issuing a query, you may see the node and/or edges field. This represents a one-to-many relationship.
- [Voiceover] In the previous video,…we looked at this viewer query.…Then we added the Repositories field, a plural,…which indicates that there's multiple different values…for this field.…A viewer might have one, two or hundreds…of different Repositories.…We can take a little bit of a closer look…inside of our DOX panel to figure out what's going here.…First, I'm going to click on our Query route type.…I'll then click on the value of viewer which is User.…If we scroll down in User…we can find the Repositories field.…
And we're going to see that unlike Path,…which is set to URI or updatedAt, which is a DateTime.…This is going to be set to a Repository connection.…So, let's go ahead and click on RepositoryConnection.…Then, we'll notice that there's Edges.…So, that's the next key here.…Then we see Node, which is another one of our fields.…And then we're down to the Repository.…So, our Repository contains the content for the project.…And the Repositories Array is going to hold that.…
That's a whole lot of vocabulary so let's get into it.…
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