
了解如何使用 Node.js 技术堆栈创建 GraphQL API
你将学到什么
使用 Nodejs、Express、TypeScript、PostgreSQL、Prisma 和 Redis 创建 GraphQL API学习
在最流行的技术堆栈之一中实现身份验证、授权、CRUD、关系等等。
学习所有优化的实践,如分页(光标)、查询复杂性、缓存等。
学习如何构建一个实用的项目,展示你的技能,找到一份工作。没有更多具有不确定结果的理论内容。
学习用失眠和操场测试 GraphQL API。
要求
这不是一个适合初学者的课程。您应该已经在 Nodejs 中创建了一些爱好项目
描述
在 Node.js 和 TypeScript 中创建 GraphQL API。每一行代码都将被严格输入。不再有“任何”类型的直觉和 JavaScript 的缺陷。
我们将使用带有 Express 的 Node.js、用于 GraphQL 的 Nexus Schema、Prisma 作为 PostgreSQL 的 ORM、Redis,当然所有内容都将使用 TypeScript 编写,包括自动生成的代码。
Genre: eLearning | MP4 | Video: h264, 1280×720 | Audio: AAC, 44.1 KHz
Language: English | Size: 1.4 GB | Duration: 6 lectures • 2h 51m
Learn how to create a GraphQL API with Node.js tech stack
What you’ll learn
Create GraphQL API with Nodejs, Express, TypeScript, PostgreSQL, Prisma and Redis
Learn to implement authentication,, authorization, CRUD, relationships and a lot more in one of the most popular tech stack out there.
Learn all those optimized practices like pagination (cursor), query complexity, caching etc.
Learn how to build a practical project, showcase your skills, get a job. No more theoretical stuff with uncertain results.
Learn testing GraphQL APIs with insomnia and playground.
Requirements
This is not a beginner friendly course. You should have already created some hobby projects in Nodejs
Description
Create GraphQL API in Node.js & TypeScript. Every line of code will be striclty typed. No more “any” type intuitions and the flaws of JavaScript.
We will be using Node.js with Express, Nexus Schema for GraphQL, Prisma as an ORM for PostgreSQL, Redis and of course everything will be written in TypeScript, including the auto generated code.
Style
Hands on
We will be spending majority of the time in our very own VS-Code. But we will also be using Playground/Insomnia for testing our GraphQL API.
I recommend you code along. And try to watch it at 1.5x speed at least. It saves time.
Architecture
Users
Register User (Create a new User)
Login (Session based authentication with caching in redis)
Get Authenticated User (Get the currently authenticated user details => more like an api which tells our api consumers that they are authenticated or not => will be judged by the validity of the cookie passed in the requests => our backend will check the cookie’s validity and spit out 401 error if the cookie is invalid/absent)
Logout
Get all Users
Posts
Create Posts (A user can create as many posts it wants => one to many relationship)
Their relationship with User (Each post will be associated to a single user as it’s author/creator => many to one relationship)
Get all Posts
Tech Stack
Language & Frameworks
Node.js
Express
TypeScript
Libraries
PostgreSQL
@prisma/client
GraphQL
nexus (for code oriented GraphQL code base)
apollo-server-express
Authentication
express-session (for authentication => session based and cookies)
Redis Cache
ioredis
connect-redis (for storing sessions in redis,, for authentication)
Who this course is for
TypeScript & GraphQL Enthusiasts.
Nodejs Developers
原创文章,作者:steven,如若转载,请注明出处:https://rr3d.cn/32746.html