GraphQL for beginners with JavaScript (Udemy.com)

A practical guide that teaches you GraphQL with JavaScript. Optimally paced, No-nonsense. Learn quickly!

Created by: James Moore

Produced in 2018

icon
What you will learn

  • What GraphQL is & why you should strongly consider using it instead of REST apis
  • How GraphQL eliminates many of the problems REST api's experience
  • How GraphQL Avoids Overfetching Data
  • How GraphQL Avoids Underfetching Data
  • How you can avoid many concurrent REST/HTTP requests by using GraphQL
  • What the N+1 Problem is, and how to avoid it with GraphQL
  • How a GraphQL API is easier to learn, because of it's Discoverability features
  • How to build GraphQL API's from scratch using JavaScript
  • How to consume a GraphQL API in your applications
  • How GraphQL provides the best possible performance for applications
  • How GraphQL makes teams more Agile
  • How GraphQL helps you to avoid Duplicate Server-side code

icon
Quality Score

Content Quality
/
Video Quality
/
Qualified Instructor
/
Course Pace
/
Course Depth & Coverage
/

Overall Score : 94 / 100

icon
Course Description

"Why should I learn GraphQL?"Obviously, you should use the right tool for the job, right? ... but often, what was therighttool, becomes the inferior tool, and frequently you don't even notice...
The most popular way of talking to servers today, is usingREST. REST offers a nice, easy to understand way of interacting with other servers, but think about this: Rest was introduced about2 decades ago Thats a long time in our world!
Let me ask you a question: how much has software development changed in 2 decades? Heck, how much has software development changed in 2 years?
A LOT!
So, I think its fair to ask the question:
Do REST apis still make sense, considering how we write software today?
To answer this question, lets look at some of theproblemswithREST APIs:
Problem -> Many Concurrent RequestsMost non-trivial applications, make many concurrent REST api calls, before the app can even render a view Why is this a problem? It might not be a problem, if the app has an excellent network connection (like our dev machines do), but it can be a horrible problem, on mobile devices with weak connections.
When mobile devices make many concurrent network requests, the response is often very slow, and the app might seem unresponsive... and it may not work at all. This can result in a dismal user experience.
So, how much should you care about mobile devices?
Well, the majority of web traffic, comes from mobile devices, which often have poor network connections and the next Billion internet users, will primarily be smart phone users... are you thinking about them?"Does GraphQL suffer from this problem?"Nope, GraphQL allows you to avoid this connection heavy behavior, by combining all your data queries, into a single server request, which greatly improves real and perceived performance.
Problem -> Multiple round trips to the server (Under-fetching Data & N+1 Problem)Sometimes, apps needs to fetch some initial data from the server, then the app might need to make subsequent requests, based on the initially returned data. In other words, your app might need to make multiple round trips requests to the server... This results in a slow app, and it can be a real server performance killer."Does GraphQL suffer from this problem?"Nope, with GraphQL, you avoid this type of chatty communication, because GraphQL allows you to perform rich/deep queries, that fetch exactly what you need, in one round trip, and youll avoid theN+1 problem, that can kill your servers performance.
Problem -> Over-fetching DataOften, REST apis give you more data, then you need. For example, imagine you're fetching some information about a book, but you only need the books title and description, there's a good chance a REST api gives you all 50+ properties of the book... You're over-fetching data and you end up taxing your servers and clients, dealing with unnecessary data/bandwidth, which results in degraded application performance."Does GraphQL suffer from this problem?"Nope, with GraphQL, you wont fetch data that you dont need, instead you create explicit queries, asking for exactly what you need, and the graphQL server provides just whats needed... Nothing more, and nothing less.
Problem -> Discoverability & DocumentationImagine youre a new employee, and youre trying to figure out what your companies existing REST apis have to offer. This can be quite a challenge. If your lucky, people are maintaining documentation on the api, but more often, youll need to ask someone, and/or dig through the code, just to figure out what's available."Does GraphQL suffer from this problem?"Nope, figuring out a GraphQL API is easy.
Hows this possible?
Many of the features in GraphQL, allow the creation of excellent developer tools such asGraphiQLandInsomnia. Tools like these greatly improve API discoverability, which you'll learn in this course.
With GraphQL, developers can quickly and easily figure out what the api offers, completely on their own.
Problems -> Slow DevelopmentIt sucks when you have to wait on other people, to complete your job. Countless times, Ive been blocked on a task, waiting on a backend developer. This interruption really sucks, especially when I'm in a flow state."Does GraphQL suffer from this problem?"Sometimes, but not nearly as frequently as REST. With GraphQL, often you can add new features, without having to touch the backend... this allows you to move faster and be more agile... How? because you're not stuck, waiting on someone else.
For example, if youre adding a feature to an existing page, and you need some additional data... with GraphQL, youll often just modify your GraphQL query, to fetch the additional data, which usually takes a matter of minutes... With REST, you'll often need custom endpoints created, which slows you down.
Problem -> Custom endpoints & duplicate server-side codeOften, to get around the shortcomings of REST ( multiple round trips, N+1 problem, etc), developers create one off, custom endpoints, which breaks REST principles, but it's usually a reasonable compromise for performance However the problem is, often you end up duplicating code on the server-side, when youve got multiple endpoints, that are just slightly different."Does GraphQL suffer from this problem?"Nope, with GraphQL, your server-side code is reused, across vastly different queries by default. For example, if youve got some code that fetches information about a book, that same server-side code, will be used when your book queries are for: Purchasing, Selling, Planning, Distribution or any other purpose.
These are just a few of the problems REST api's have... GraphQL was created to solve these problems, and many more, which you'll learn in this course.
Who is this course for?
This course is for developers who are familiar with JavaScript, and are interested in understanding how GraphQL can improve your applications performance, and significantly improve the developer experience.
What Will I learn in this course?
You can think of GraphQL as 2 separate, but related parts:
AQuery LanguageandAServer Runtimeto satisfy queriesIn the first part of the course, well focus on learning theQuery Language, which includes topics such as:
Scalar TypesObject TypesQuery ParametersVariablesInterfacesAliasesFragmentsUnion TypesDirectivesInput TypesRoot types (query & mutation)Error handlingDiscoverabilityTooling / GraphiQL...
In the second part of the course, well focus on building aGraphQL server, for the courses project app Hacker Book Review.
Well build the server withNode.
jsandPostgreSQL, and well use excellent and popular open source GraphQL libraries.
What are the pre-requisites for taking this course?
You should be familiar with Modern JavaScript.
What will we be building in this course?
In this course, well be building the GraphQL server, needed for our project app... Then we'll be creating the GraphQL queries needed for the app, and then we'll connect the app with the GraphQL server.
Hacker Book

icon
Instructor Details

James Moore

James discovered the joy of software development while submerged hundreds of feet deep in the pacific ocean. He liked it so much, he left his career as Navy Nuclear Submariner to learn everything he could about creating software. As a nuclear trained engineer, he figured out how to learn things quickly, which has helped in a career where the learning never stops. Currently hes an independent software developer, consultant and trainer.

icon
More javascript courses

Introduction to HTML5

Free

Functional Programming Principles in Scala

Free

Introduction to CSS3

Free

Front-End Web UI Frameworks and Tools

Free

Learn and Understand AngularJS

$11.99

Programming with JavaScript

$11.99

icon
Reviews

4.7

64 total reviews

5 star 4 star 3 star 2 star 1 star
% Complete
% Complete
% Complete
% Complete
% Complete

By Noyan Alimov on 11/21/2020

Awesome course!

By Brian Marshall on 9/27/2020

So far, very clear, thank you!

By Brian Morgan on 9/23/2020

Professional presentation but unfortunately it was not what I was looking for. I was hoping that there was greater emphasis on schema design. Instead the bulk of the course focused on implementing the back-end of one particular schema. It would have been more helpful if the back-end solution could have handled any generic schema. Perhaps it eventually did but I tuned out at about the 75% mark. I know that is a tall order but I would have been thrilled if the course used a service like FaunaDB and instead took a deep-dive into schemas, mutations, and queries.

By Rob R on 9/19/2020

The course has good content however it is not well organized. The instructor spends a lot of time in a custom sandbox that is not linked to anywhere, except in the videos; if you forget to save the sandbox URL, when he randomly goes back to it, if you want to work along, you have to dig back through the videos to find the URL. Most courses have a "Resources" link on the first video for this kind of thing; not sure why the instructor didn't do the same.

By Henry Dumont on 9/17/2020

I love James' way of teaching, very clear, illustrated, with a cool tone.

By Matias Salom Avella on 9/13/2020

Es un profesor totalmente actualizado. Sabe tanto que es capaz de explicarlo muy bien, con prcticas reales y muy tiles

By Abu Zakaria on 9/10/2020

Hands on and to the point.

By Taegook Song on 8/24/2020

Excellent !!!

By Manju Jonchhe on 8/16/2020

This is one of the best tutorials in Udemy. The instructor is very clear and precise.

By Vijayakumar U on 7/16/2020

I like the teaching method... especially, certain topics like why Graph in GraphQL, you cant find it common in other courses...

By Rahul on 7/8/2020

This is the best GraphQL course i believe i had attended.Really liked the way trainer explains all the topics. Looking forward to more.

By Hashem Aldhaheri on 6/26/2020

The best course that explain the essential parts of GraphQL. Thanks James.