Testing - Integration Test for the Register Method and Creation of Test Helpers

Testing - Integration Test for the Register Method and Creation of Test Helpers

Preview unavailable

You must log in or sign up to view this lesson.

LoginSign up

(Pre-Sale) Build a Twitter clone GraphQL API using Golang

Buy nowLearn more

Introduction

  • Tools Needed
  • Course Structure
  • Folder Structure
  • Go Modules

Basic AuthService

  • Intro - AuthService and Register
  • Coding - AuthService Interface and Validation of the RegisterInput1
  • Testing - AuthService RegisterInput
  • Coding - Register and Dealing With the UserRepo Interface
  • Testing - Mockery and how to Mock the UserRepo so we can test the Register Method2
  • Coding - Add the Login Method1
  • Testing - Add Tests to our Login Logic1
  • How to Speed up our Bcrypt Testing

PostgreSQL Setup

  • Coding - Setup PGX and Install Gotdotenv1
  • Coding - Add Migrations with Golang-Migrate1

Basic UserRepo

  • Coding - UserRepo Implementation
  • Testing - Integration Test for the Register Method and Creation of Test Helpers
  • Testing - Improving our Faker Package

GQL - Auth Resolvers

  • Intro - What is gqlgen
  • Coding - Adding gqlgen and Basic Setup of AuthResolver
  • Coding - Register & Login Resolvers

JWT - AccessToken - RefreshToken

  • Intro - How we will work with the Refresh token
  • Coding - Implementation of the Refresh/AccessToken Creation and Parsing Logic
  • Testing - Writing Tests for our JWT Package
  • Coding/Testing - Create Auth Middleware and Play With Context
  • Coding/Testing - Using Insomnia for GraphQL Request and fix our Mocks4

Tweet Service

  • Coding/Testing - Creating TweetService and TweetRepo Interface
  • Coding/Testing - Create Tweet Migration and Setup Create Tweet Logic
  • Coding/Testing - Implement TweetService GetByID and All

GQL - Tweet Resolvers

  • Coding - Implement Create Mutation and Tweets Query
  • Coding/Testing - Implement TweetService Delete and Plug it to GraphQL
  • Coding - Adding the User Relationship to the Tweet
  • Coding - Adding Dataloader for the Tweet User Relationship
  • Coding/Testing - Adding Replies to Tweet
  • Coding - Adding Replies to our GQL Layer