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 0:00 terms you encounter when using GraphQL, queries, type, and fields. 0:05 Queries are what we write to specify the data we want to fetch from a GraphQL 0:10 server and how we want that data to look. 0:14 In the last video, we used a query to fetch information about Gone With the Wind 0:18 from the movie by ID endpoint on our GraphQL server. 0:23 Fields are the properties that make up the shape of our objects. 0:27 They are the core of GraphQL. 0:31 Using fields, we can include or exclude properties of an object to craft 0:33 a response that is tailored precisely to the context we wanna use it in. 0:38 Finally, types are specific collections of fields that make up a queryable object. 0:43 In the last video, we had two main types, movies and studios. 0:49 The movie type had fields like ID, title, revenue, and studio, 0:54 while the studio type had an ID, a name, and a location field. 0:58
You need to sign up for Treehouse in order to download course files.Sign up