Tutorialspoint

#May Motivation Use code MAY10 for extra 10% off

GraphQL API with Node.js, TypeScript, PostgreSQL

person icon Aman Bhardwaj

4.6

GraphQL API with Node.js, TypeScript, PostgreSQL

Learn to implement authentication,, authorization, CRUD, relationships, Cursor based pagination and a lot more in one of the most popular tech stack out there.

updated on icon Updated on May, 2024

language icon Language - English

person icon Aman Bhardwaj

English [CC]

category icon Node.JS,Express Framework,SQL,TypeScript,GraphQL,

Lectures -6

Duration -2.5 hours

4.6

price-loader

30-days Money-Back Guarantee

Training 5 or more people ?

Get your team access to 10000+ top Tutorials Point courses anytime, anywhere.

Course 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

  1. Hands on

    1. 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.

    2. I recommend you code along. And try to watch it at 1.5x speed at least. It saves time. 

Architecture

  1. Users

    1. Register User (Create a new User)

    2. Login (Session based authentication with caching in redis)

    3. 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)

    4. Logout

    5. Get all Users

  2. Posts

    1. Create Posts (A user can create as many posts it wants => one to many relationship)

    2. Their relationship with User (Each post will be associated to a single user as it's author/creator => many to one relationship)

    3. Get all Posts

  3. Pagination

    1. Difference between Cursor and Offset based paginations.

    2. Cursor based pagination implementation.

Tech Stack

  1. Language & Frameworks

    1. Node.js

    2. Express

    3. TypeScript

  2. Libraries

    1. PostgreSQL

      1. @prisma/client

    2. GraphQL

      1. nexus (for code oriented GraphQL code base)

      2. apollo-server-express

    3. Authentication

      1. express-session (for authentication => session based and cookies)

    4. Redis Cache

      1. ioredis

      2. connect-redis (for storing sessions in redis,, for authentication)

Goals

What will you learn in this course:

  • Create GraphQL API with Nodejs, Express, TypeScript, PostgreSQL, Prisma, and Redis

  • Learn to implement authentication, authorization, CRUD, relationships, Cursor based pagination and a lot more in one of the most popular tech stacks out there.

  • Learn all those optimized practices like pagination (cursor), query complexity, caching etc.

  • Learn how to build a practical project, showcase your skills, and get a job. No more theoretical stuff with uncertain results.

  • Learn testing GraphQL APIs with insomnia and playground.

Prerequisites

What are the prerequisites for this course?

  • Basic understanding of the following (A database-backed todo list experience would suffice) - 
  • Node.js & Express
  • TypeScript
  • PostgreSQL
  • GraphQL
GraphQL API with Node.js, TypeScript, PostgreSQL

Curriculum

Check out the detailed breakdown of what’s inside the course

Introduction & Setting up things
1 Lectures
  • play icon Intro 31:28 31:28
User Registration and Authentication, Posts and Pagination
5 Lectures
Tutorialspoint

Instructor Details

Aman Bhardwaj

Aman Bhardwaj

e


Course Certificate

Use your certificate to make a career change or to advance in your current career.

sample Tutorialspoint certificate

Our students work
with the Best

Related Video Courses

View More

Annual Membership

Become a valued member of Tutorials Point and enjoy unlimited access to our vast library of top-rated Video Courses

Subscribe now
Annual Membership

Online Certifications

Master prominent technologies at full length and become a valued certified professional.

Explore Now
Online Certifications

Talk to us

1800-202-0515