Instructor: Let's add onto our query a bit and request some data about the pets that are available at the pet library. If I wanted a list of all of our pets, I'm going to query the allPets field. I'll open up our curly braces to select name and weight for each of these pets, and then I'll click play.
I'll see that allPets returns an array of pets with name and weight for each of them. Also, if I collapse the allPets field, we'll see that totalPets is also being sent in the query, and we get that data as well.
If we take a closer look at the query, everything wrapped with curly braces is called a selection set. Each piece of data that we're requesting is called a field. I can also add comments to the query by using the pound sign or hashtag.
Then if I were to use this on one of the fields, we'll see that name is now removed from the query and is not returned.