graphql-yoga-with-typeorm-boilerplate v1.1

Description

  • Boiler plate project for
    • graphql-yoga(express)
    • typescript
    • typeorm
    • postgres

Features

  • Express Server (port 4000)
  • Graphql Entry Point (/graphql)
  • Graphql Playground Page (/playground)
  • Typeorm Settings For Postgres
  • Basic User Entity (src/entities/User.ts)
  • Email Sign Up
  • Email Sign In
  • Get My Profile

Usage

Create project

mkdir graphql-project
cd graphql-project
git clone https://github.com/DalYoon/graphql-yoga-with-typeorm-boilerplate .

Change .env for your database and JWT Secret

DB_ENDPOINT=(your database address)
DB_NAME=DB-NAME=(your database name)
DB_USERNAME=(your database username)
DB_PASSWORD=(your database password)
JWT_SECRET=(your JWT secret for authentication)

VSCode GraphQL Support

Install the GraphQL VSCode Extension for best experience.

Run yarn to install dependencies

yarn

Run yarn dev to start the server

yarn dev

Connect to http://localhost:4000/playground for playground page

Add entities those you need into src/entities/*

Enjoy!