Complete guide to building a GraphQL API
4.1 (212 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
994 students enrolled

Complete guide to building a GraphQL API

Everything you need to know to build your own GraphQL API
4.1 (212 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
994 students enrolled
Created by Xavier Decuyper
Last updated 10/2017
English
English [Auto]
Current price: $34.99 Original price: $49.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 2 hours on-demand video
  • 1 article
  • 1 downloadable resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
What you'll learn
  • Understand how GraphQL works
  • Build your own GraphQL API with JavaScript
  • Learn how to install and use Graphiql
Course content
Expand all 25 lectures 01:45:35
+ Introduction
3 lectures 08:44
What is GraphQL?
02:44

REST API's are very popular still today. So why would you start using GraphQL instead?

In this video we'll explore the big differences between GraphQL and REST. I'll also talk about why GraphQL is a better choice and how much more efficient it is.

Preview 04:22
+ Core concepts
5 lectures 16:43
Introduction
00:56

GraphQL is all about using fields to get specific data out of your API. They are very flexible and always behave the same way, wherever you use them in your queries. 

Sometimes you want to pass some information to your fields. With arguments you can do exactly that. You can for instance request the details of a blog post and give the ID of the post as an argument.

Preview 04:17

In this video I'll introduce two new concepts: aliases and fragments.

In GraphQL, every field that your query has to be unique. With aliases you can work around this limitation. So you can ask for details about blog post #1 and blog post #2 at the same time.

If you are querying the same fields over and over again, your queries become big and cluttered. With fragments you can group those repetitive fields and re-use them easily. Cleaner code & easier to manage! 

Aliases & Fragments
03:23

When building an API you will definitely need to send some user input to the server. In GraphQL it's considered a bad practice to include user input into your query. Instead you can use variables to safely send user input to the server.

Variables
03:05

Up until this point I've talked a lot about how queries work in GraphQL. In this video we'll go over the differences between queries & mutations. They look a lot like each other, they behave in the same way and yet they are different.

Queries & Mutations
05:02
+ Preparations before building an API
5 lectures 21:10
Introduction
01:17
Creating the project structure
04:04
Installing dependencies
05:54
Configuring Babel
05:44
Dummy database
04:11
+ Building the API
7 lectures 44:52
Introduction
01:07
Implementing "Object types"
12:18
Implementing "Queries"
08:59
Implementing the "Input Object Types"
05:11
Implementing "Mutations"
06:28
Combining everything into a Schema
04:48
Testing our API
06:01
+ GraphiQL
3 lectures 12:57
What is GraphiQL?
01:42
Installing & configuring GraphiQL
05:25
Using GraphiQL
05:50
+ Conclusion, wrap-up & downloads
2 lectures 01:08
Conclusion & next steps
01:02
Source code & useful resources
00:06
Requirements
  • Basic knowledge of JavaScript and Nodejs
Description

GraphQL is a query language developed by Facebook to power their mobile applications. It's a replacement for traditional REST API's and is far more flexible and faster. With GraphQL you can query multiple resources with a single request to the server. Making it ideal for web applications and mobile apps.

It's very easy to write your own GraphQL API. It's compatible with any database and can even work across different database engines if required. Start now and have your GraphQL API running in no time!

Who this course is for:
  • Anyone who wants to learn how to build a GraphQL API
  • Anyone who is tired of inflexible, inefficient REST API's