Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
GraphQL Terminology: Queries, Types, and Fields1:03 with Isaac Lee Morris
In this video, we’ll go over some of the basic terminology you’ll see when working with GraphQL.
- Query - Queries specify which endpoints we want to call, how we want the response to look
- Fields - Properties that comprise the shape of a response
- Type - A collection of fields that make up a specific queryable object.
GraphQL Documentation: Fields
Now, before we jump into our first query, let's define some of the basic
terms you encounter when using GraphQL, queries, type, and fields.
Queries are what we write to specify the data we want to fetch from a GraphQL
server and how we want that data to look.
In the last video, we used a query to fetch information about Gone With the Wind
from the movie by ID endpoint on our GraphQL server.
Fields are the properties that make up the shape of our objects.
They are the core of GraphQL.
Using fields, we can include or exclude properties of an object to craft
a response that is tailored precisely to the context we wanna use it in.
Finally, types are specific collections of fields that make up a queryable object.
In the last video, we had two main types, movies and studios.
The movie type had fields like ID, title, revenue, and studio,
while the studio type had an ID, a name, and a location field.
You need to sign up for Treehouse in order to download course files.Sign up