Skip to main content
CF

GraphQL for beginners with JavaScript

5h 35m 31s
English
Paid

Discover why it's time to rethink REST APIs and embrace GraphQL with JavaScript for optimized server communication.

Why Move from REST to GraphQL?

REST has been the go-to method for interacting with servers for decades, but with the rapid evolution in software development, it's essential to assess whether it still fits today's needs. Let's explore some common issues associated with REST APIs and how GraphQL addresses them.

Common REST API Challenges

1. Many Concurrent Requests

Apps often make numerous concurrent REST API calls, which can slow down performance, especially on mobile devices with weak connections, leading to a poor user experience. GraphQL solves this by consolidating all data queries into a single server request, significantly enhancing performance.

2. Multiple Round Trips (Under-fetching & N+1 Problem)

REST API calls can require multiple round trips to gather data, resulting in slower apps and increased server load. GraphQL allows rich queries in one request, mitigating the N+1 problem.

3. Over-fetching Data

REST APIs may provide more data than needed, leading to unnecessary bandwidth usage and reduced performance. GraphQL enables precise data fetching, ensuring you only receive what you request.

4. Discoverability & Documentation

Understanding existing REST APIs can be daunting without proper documentation. GraphQL's features facilitate the creation of developer tools like GraphiQL, enhancing API discoverability.

5. Slow Development

Waiting on backend developers can hinder progress. With GraphQL, frontend adjustments often don't require backend changes, allowing faster feature releases and improved agility.

6. Custom Endpoints & Duplicate Code

To overcome REST limits, developers create custom endpoints, but this leads to duplicated server-side code. GraphQL reuses server-side code across different queries by default.

These are just a few REST API problems. GraphQL solves these and more, which you'll explore in this course.

Course Overview

If you're a JavaScript developer eager to improve application performance and the developer experience, this course is tailored for you.

Course Structure

GraphQL: Two Core Components

  • A Query Language for data retrieval.

  • A Server Runtime for fulfilling queries.

Learning Objectives

  • Explore scalar and object types, query parameters, variables, and more.
  • Understand GraphQL server setup using Node.js and PostgreSQL.
  • Learn to build and connect a GraphQL server for a project app.

Pre-requisites

Familiarity with modern JavaScript is essential for this course.

Project Highlight

You will develop Hacker Book Review – a book review app, by creating and connecting GraphQL queries and servers.

Instructor Approach

I prioritize practical content with clear visuals and animations. Courses are concise, well-structured, and high-quality.

Course Details

  • Course Length: Over 5 hours of targeted content split across more than 50 videos and hands-on exercises.
  • Completion Time: Flexible pacing; complete over a weekend or at your leisure.
  • Learning Outcome: Gain in-depth understanding and practical skills to create and use GraphQL servers.

Requirements

  • Familiarity with Modern JavaScript
  • A desire to learn cutting-edge technology

Target Audience

  • Frontend and Backend JavaScript developers keen to understand and apply GraphQL APIs

What You'll Learn

  • Understand the benefits of GraphQL over REST APIs.
  • Learn how GraphQL addresses over-fetching and under-fetching issues.
  • Discover how to minimize concurrent HTTP requests using GraphQL.
  • Avoid the N+1 problem with efficient data fetching.
  • Enhance API discoverability with GraphQL features.
  • Build and utilize GraphQL APIs from scratch with JavaScript.
  • Achieve superior application performance and team agility with GraphQL.

Additional

https://github.com/knowthen/graphql 

About the Author: Udemy

Udemy thumbnail

Udemy is the largest open marketplace for online courses on the internet. Founded in 2010 by Eren Bali, Oktay Caglar, and Gagan Biyani and headquartered in San Francisco, the company went public on the Nasdaq in 2021 under the ticker UDMY. The platform hosts well over two hundred thousand courses across software development, IT and cloud, data science, design, business, marketing, and creative skills, taught by tens of thousands of independent instructors. Roughly seventy million learners use it worldwide, and the corporate arm — Udemy Business — supplies a curated subset of that catalog to enterprise customers.

Because Udemy is a marketplace rather than a single editorial publisher, the catalog is uneven by design. The strongest material lives in the long-form, project-based courses authored by working engineers — full-stack JavaScript, React, Node.js, Python data science, AWS, Docker and Kubernetes, mobile development with Flutter and React Native, and cloud certification preparation. The CourseFlix listing under this source is the slice of that catalog that has been mirrored here for offline-friendly viewing, organized by topic and updated as new releases land. Pricing on Udemy itself swings dramatically with the site's near-permanent sales, which is why the platform is best treated as a deep reference catalog: pick instructors with strong reviews and a track record of updating their material rather than buying on the headline price alone.

Watch Online 57 lessons

This is a demo lesson (10:00 remaining)

You can watch up to 10 minutes for free. Subscribe to unlock all 57 lessons in this course and access 10,000+ hours of premium content across all courses.

View Pricing
0:00
/
#1: Why GraphQL?
All Course Lessons (57)
#Lesson TitleDurationAccess
1
Why GraphQL? Demo
05:25
2
The Problems with REST
09:48
3
What We'll Be Building
06:30
4
The Graph in GraphQL
05:26
5
What is GraphQL?
04:58
6
First GraphQL Query
05:52
7
Discoverability
07:43
8
First GraphQL Server - Part 1
05:10
9
First GraphQL Server - Part 2
10:32
10
GraphQL Data types Introduction
04:35
11
Scalar Types
05:28
12
Object Types
04:46
13
Query Parameters
07:55
14
Variables
06:03
15
Interfaces
04:58
16
Aliases & Fragments
10:10
17
Union Types
06:52
18
Directives
03:56
19
Mutations and Input Types
05:08
20
Errors
03:12
21
GraphQL without GraphiQL
10:50
22
Server Planning
02:02
23
Review Starter Project
04:49
24
Installing PostgreSQL
01:21
25
Installing PostgreSQL on Windows
03:55
26
Installing PostgreSQL on Linux
02:32
27
Installing PostgreSQL on Mac
02:00
28
Introduction To SQL
12:41
29
Create / Setup App Database
08:32
30
Create a GraphQL HTTP Server
06:34
31
Add GraphQL 'Books' Field
07:29
32
Query Books from the Database
05:10
33
Challenge Review - Adding 'subtitle' & 'ratingCount' Fields
03:22
34
Add ImageUrl field to book type
06:44
35
Add authors field to book type
07:34
36
Optimize with the Dataloader - Part 1
10:42
37
Optimize with the Dataloader - Part 2
09:56
38
Add GraphQL 'reviews' Field
03:07
39
Add 'book' field to Review Type
14:46
40
Challenge Review - Add 'book' field to Review type
03:43
41
Sorting Queries
07:21
42
Create Home Page Query
03:02
43
Use the Home Page Query in HackerBook Review App
11:16
44
Create Book Detail Page Query
03:45
45
Add 'book' field to Review Type
05:35
46
Add Query to Book Page in HackerBook Review App
05:32
47
Query 'book' for Book Review Page in HackerBook Review App
03:18
48
Create Book Review Mutation
06:58
49
Use the Book Review Mutation in HackerBook Review App
03:33
50
Add 'searchBook' field to query Google Book API
05:49
51
Use 'searchBook' field in HackerBook Review App
03:08
52
Add 'createBook' mutation
05:27
53
Use 'createBook' mutation in HackerBook Review App
02:19
54
Add a Global 'search' field
09:34
55
Miscellaneous & Cleanup
01:45
56
GraphQL / Versionless
03:41
57
Final Thoughts
01:12
Unlock unlimited learning

Get instant access to all 56 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.

Learn more about subscription

Related courses

Frequently asked questions

What are the prerequisites for enrolling in this course?
Before enrolling, students should have a basic understanding of JavaScript. Familiarity with REST APIs can be beneficial, as the course begins by comparing GraphQL to REST. No prior knowledge of GraphQL is required, as the course covers the fundamentals from scratch, including setting up a GraphQL server and executing queries.
What will I build during this course?
Throughout the course, students will build components of the HackerBook Review App. This includes creating and querying a GraphQL server, optimizing with Dataloader, handling mutations, and integrating with external APIs like Google Books. The course offers hands-on experience with real-world applications, such as developing queries for a home page and book detail page.
Who is the target audience for this course?
This course is designed for JavaScript developers who are looking to optimize server communication by transitioning from REST to GraphQL. It is ideal for those who wish to gain practical experience in building and querying GraphQL servers and want to improve their understanding of data-fetching efficiency and API integrations.
How does the depth of this course compare to similar offerings?
The course provides a foundational understanding of GraphQL, covering key concepts such as queries, mutations, data types, and server setup. With 57 lessons, it offers a comprehensive introduction suitable for beginners, but may not cover advanced GraphQL topics in depth. Students looking for more advanced use cases may need to pursue further study after completion.
What specific tools or platforms will I learn to use in this course?
Students will learn to set up and use tools such as PostgreSQL for database management and GraphiQL for API exploration. The course also involves creating an HTTP server for GraphQL and using the Dataloader for query optimization, providing a practical toolkit for developing GraphQL applications.
What topics are not covered in this course?
The course does not delve into advanced GraphQL topics such as subscriptions, real-time data updates, or complex authorization mechanisms. Additionally, it does not cover deployment strategies for GraphQL servers or advanced performance tuning techniques beyond basic optimizations with Dataloader.
How much time will I need to complete this course?
With 57 lessons, the course is structured for flexible pacing. While the total runtime is not specified, students can expect to dedicate several hours to complete the lessons, exercises, and projects. The time commitment will vary based on prior experience with JavaScript and familiarity with REST APIs.