Mô tả

More and more teams are choosing GraphQL instead of (or along with) REST for their web APIs. GraphQL queries give clients great flexibility in the way they request data from the server, preventing issues such overfetching or underfetching of data, and allowing multiple resources to be retrieved in a single request.

In this course you'll learn how to use GraphQL both on the server side and in client applications through practical examples in the form of full-stack JavaScript applications. You will be introduced to all the main GraphQL concepts like schema definition, Queries, Mutations, and Subscriptions, as well as to solution to common requirements such as handling authentication/authorization and client-side caching.

The examples use Apollo Server with Node.js and Express on the backend and React on the frontend, with GraphQL-Request first, then Apollo Client as GraphQL clients. GraphQL-WS is used for subscriptions.

The aim however is not just to cover specific GraphQL libraries, but to give you a more general understanding of the underlying concepts. For instance, GraphQL client libraries are introduced only after learning how to write a simple client "by hand", to make sure you understand the GraphQL over HTTP format.

This course assumes good knowledge of modern JavaScript, and ideally some familiarity with Node.js/Express and React.

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

Build a GraphQL server based on NodeJS, Express and Apollo Server

Call GraphQL APIs from JavaScript using GraphQL-Request or Apollo Client

Handle Authentication/Authorization, Caching, and more

Receive real-time updates with GraphQL Subscriptions

Yêu cầu

  • Good knowledge of modern JavaScript, including ES6+ and NodeJS
  • Some knowledge of Express and React preferable but not strictly required

Nội dung khoá học

14 sections

Introduction

3 lectures
What is GraphQL
05:04
Required Tools
00:33
Course Advice
00:42

Fundamentals

8 lectures
Schema Definition
06:05
Apollo Server
06:13
Query Language
06:43
GraphQL Over HTTP
04:37
GraphQL Client
07:42
Github Repository
04:51
Code-First vs Schema-First
10:22
Final Code
00:08

Schema

11 lectures
Job Board Architecture
06:45
Job Board Project
07:44
Github Repository
00:28
Apollo Server with Express
08:51
Custom Object Types
07:36
Arrays and Non-Nullability
07:02
Database Access
07:13
Field Resolvers
08:15
Resolver Chain
05:15
Documentation Comments
04:10
Object Associations
06:56

Queries

8 lectures
Starting Code
00:16
GraphQL-Request
07:04
Component State in React
05:02
Query Arguments
08:19
Query Variables
07:02
Exercise: Company by ID
04:45
Bidirectional Associations
06:39
Recursive Queries
04:23

Errors

4 lectures
Starting Code
00:14
GraphQL Errors
04:47
Custom Errors
05:15
Request States
07:37

Mutations

7 lectures
Starting Code
00:14
Mutations
08:53
Input Types
04:46
Aside: Database Reset
01:57
Mutation Requests
05:02
Exercise: Delete Job
04:03
Exercise: Update Job
03:35

Authentication

8 lectures
Starting Code
00:14
Authentication Flow
07:23
Resolver Context
08:11
User-Company Association
04:49
Client Authentication
05:07
Secure Delete
05:46
Exercise: Secure Update
01:57
Where to Authenticate
04:10

Caching with Apollo Client

9 lectures
Starting Code
00:14
Apollo Client Features
03:57
Apollo Client Setup
03:48
Query Method
02:56
Mutate Method and Auth Link
07:36
Apollo Client Cache
07:39
Fetch Policies
06:07
Cache Manipulation
06:02
Fragments
04:03

Apollo React Integration

7 lectures
Starting Code
00:14
useQuery Hook
06:03
React Custom Hooks
03:18
Exercise: useJob and useJobs
03:27
useMutation Hook
04:57
useMutation Result
02:56
Exercise: useCreateJob
04:48

Data Loaders

4 lectures
Starting Code
00:14
N+1 Query Problem
04:40
Batching with DataLoader
07:05
Per-Request Cache
05:57

Pagination

9 lectures
Starting Code
00:14
Pagination Strategies
08:40
Ordering
04:49
Limit Clause
03:55
Offset Clause
03:47
Basic Pagination UI
07:15
Total Count
08:25
Full Pagination UI
07:11
Final Code
00:07

Subscriptions

12 lectures
Chat Project
05:57
Github Repository
00:28
Cache updateQuery
06:12
Subscription Definition
06:14
GraphQL-WS Server
05:49
Subscription Resolver
06:05
GraphQL-WS Client
07:17
useSubscription Hook
06:04
WebSocket Protocol
04:07
Connection Params
04:51
WebSocket Server Auth
07:52
Final Code
00:07

TypeScript Code Generation

9 lectures
Job Board TypeScript Project
08:05
Github Repository
00:33
Server Code Generator
07:27
Typed Resolvers
07:19
Typed Context
05:36
Watch Mode
05:20
Client Code Generator
06:07
Typed Queries
09:08
Final Code
00:07

Conclusion

1 lectures
Congratulations and Bonus
00:23

Đá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.