Mô tả

This course will teach you how to build a GraphQL API from absolute scratch. It is taught by a developer that has over 3 years of experience with GraphQL and has worked with it in multiple enterprise companies. By the end of this crash course, you will become an expert and know more than 99% of GraphQL hobbyists. This course isn't just aimed to teach you GraphQL, but how to properly utilize it in a real application. I hope you enjoy it!


We will be learning everything from scratch and thus you can be a GraphQL beginner to take this course. However, we will be using JavaScript as our primary language and thus some JS knowledge is ideal. We will also connect our server to the frontend and we will be using React as our client. Thus any frontend knowledge would be good but not unnecessary.


This course will teach you:

- What is GraphQL

- What are the benefits of GraphQL

- Learn GraphQL terminology

- How to build a GraphQL server

- Modern design principles

- Adding Authentication

- Working with Prisma v3 to interact with a Postgres DB

- Connecting GraphQL to the client

- Improve performance by learning about the n + 1 problem and solving it will data loaders

Bạn sẽ học được gì

Learn what is GraphQL and how it compares to REST

Learn how to build a GraphQL API

Learn the best practices designing a GraphQL API

Learn how to build multiple projects with GraphQL

Build a full React, Node and GraphQL Application

Yêu cầu

  • Just the basics of programming. JavaScript would be good

Nội dung khoá học

10 sections

Introduction to GraphQL

4 lectures
What is GraphQL
03:17
GraphQL Prevents Over-Fetching
06:10
GraphQL Prevents Under-Fetching
04:03
How Data is Organized
03:35

Queries and Schemas

16 lectures
Local Environment Setup
02:38
Setting up a GraphQL Server
15:24
GraphQL Scalar Types
08:30
GraphQL Array Types
04:41
Nodemon for Hot Reloading
02:15
GraphQL Object Types
06:38
Querying an Array of Objects
02:53
Querying One Object with Variables
08:31
Queries for Categories
11:00
Relating Data (One to Many)
10:12
Relating Data (Many to One)
06:20
Reorganizing for a Better File Structure
08:59
The Context Param
05:59
Adding the Ability to Query for Reviews
09:05
Filtering and Input Type
11:25
Filter by Average Rating
11:18

Mutations

8 lectures
Intro to Mutations
03:12
Creating Data - Part I
07:15
Creating Data - Part II
13:22
Deleting Data (with Set Null) - Part I
15:40
Deleting Data (with Delete Cascade) - Part II
06:53
Deleting Data - Part III
02:26
Updating Data - Part I
09:15
Updating Data - Part II
08:18

15 Rules of GraphQL Design

17 lectures
Introduction to GraphQL Design
09:56
A Naive Implementation
08:35
Rule 1 - Start with a High Level View of the Objects and Their Relationships
03:10
Rule 2 - Never Expose Implementation Details
02:33
Rule 3 - Design your API Around your Business Domain
03:21
Rule 4 - It's Easier to Add Fields than to Remove Them
03:00
Rule 5 - Group Closely-Related Fields Together into Sub-Objects
02:44
Rule 6 - Always Check if a List Should be Paginated
03:33
Rule 7 - Always use Object References Instead of ID Fields
01:49
Rule 8 - Choose Field Names Based on What Makes Sense, Not the Implementation
01:12
Rule 9 - Use Enums for Fields that can Only Take a Specific Set of Values
01:44
Rule 10 - Your API Should Provide Business Logic, Not Just Data
03:04
Rule 11 - Write Separate Mutations for Separate Logical Actions on a Resource
02:18
Rule 12 - For Relationship Mutations Consider Operating on Multiple Elements
01:35
Rule 13 - Prefix Mutation Names with the Object for Alphabetical Grouping
05:33
Rule 14 - Structure Mutation Inputs to Reduce Duplication
04:03
Rule 15 - Mutations Should Provide User/Business Level Errors
03:12

New Project Setup (Social Media App)

4 lectures
A New Project
05:37
A Little About TypeScript
04:49
Setting up TypeScript
07:51
Setting up an Apollo Server
09:56

Database Storage with Prisma v3

10 lectures
A Little About SQL Databases
06:40
Spinning up a Postgres Instance
05:13
Connecting to Our Database with Prisma
06:36
Creating a Database Schema
10:37
Adding Entity Relationships
09:06
Defining Our GraphQL Schema
21:37
Creating Data with Prisma
09:27
Retrieving Data with Prisma
05:03
Updating Data with Prisma
21:16
Deleting Data with Prisma
06:18

Authentication and Authorization

10 lectures
What is Authentication & Authorization
03:36
A Naive Signup Implementation
11:36
Validating the Inputs
11:35
Password Hashing
15:15
Json Web Tokens
12:35
Creating a User Profile
02:11
Adding the Sign In Mutation
12:42
Identifying Users with JWT
13:21
Authorizing Users with JWT
10:38
Adding Publish/Unpublish Logic
07:10

Adding Data Relationships

3 lectures
The Me Query
05:18
The Profile Query
08:48
Relational Post Queries
11:38

Dataloaders and the N + 1 Problem

3 lectures
The N + 1 Problem
07:46
Batching and Catching Queries
05:54
Adding a DataLoader to Improve Performace
13:42

Connecting to the Frontend

10 lectures
Introduction to Client Connect
04:24
Connect the Client to GraphQL with Apollo Client
05:50
Querying From the Frontend
11:46
Querying with Variables
10:46
Conditional Rendering Based on Authentication Status
03:20
Passing the Auth Token From the Frontend
06:49
Executing Mutations From the Frontend
13:24
Adding Signin/Signup Logic
17:53
Adding Logic to Create a Post
10:37
The Last Steps
00:48

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.