GraphQL is most commonly compared to REST. Eve describes updating REST resources on URIs and how GraphQL makes data fetching and updating easier.
- [Instructor] When we talk about GraphQL,…we often talk about how it differs from REST.…If you've worked with the API's,…or application programming interfaces before,…you've probably encountered REST,…or representational state transfer.…Now, there are many different flavors of REST,…but typically we'll request or update resources…on different URI's.…Let's say we have some data about Ohio.…To fetch all of the data about Ohio,…I could find it at the /api/ohio route.…
Then we might make another get request…for some data at the Cleveland route.…This all starts out very innocently,…but REST endpoints have a way…of quickly starting to multiply…as our data-fetching needs expand.…If we're looking for people in Ohio with hats,…we might create a custom endpoint for this data.…Requesting it would require several different requests,…one for Ohio, another for people,…then we have to find all of the people with hats in Ohio.…The chaos starts to pile on pretty quickly,…and due to this, the response time can be slower…than we'd like,…
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