GithubHelp home page GithubHelp logo

graphql-yoga-with-typeorm-boilerplate's Introduction

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=(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!

graphql-yoga-with-typeorm-boilerplate's People

Contributors

dalyoon avatar mununki avatar serranoarevalo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

graphql-yoga-with-typeorm-boilerplate's Issues

createJWT() needs to return :Promise<string> not :string

createJWT() in createJWT.ts returns string type. But in case of using it, it is expected to return Promise<string>, such as in EmailSigninIn.ts.

Hence, I think createJWT() needs to return Promise<string> in order to expect the synchronous result.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.