Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Well done!
You have completed Introduction to GraphQL!
You have completed Introduction to GraphQL!
Preview
In this video, we’ll go over some of the basic terminology you’ll see when working with GraphQL.
New Terms:
- 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.
Further Reading:
GraphQL Documentation: Fields
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
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 upYou need to sign up for Treehouse in order to set up Workspace
Sign up