Code Monkey home page Code Monkey logo

graphql-ts-server's Introduction

GraphQL TS Server Boilerplate

Steps to run this repo:

  1. Run yarn install command

  2. Setup database settings inside ormconfig.ts file

  3. Setup .env

    TYPEORM_HOST=
    TYPEORM_USERNAME=
    TYPEORM_PASSWORD=
    TYPEORM_DATABASE=
    DEBUG=true
    ACCESS_TOKEN_SECRET=
    REFRESH_TOKEN_SECRET=
    SESSION_SECRET=
    FRONTEND_URL=http://localhost:3000
  4. Run yarn start command

Schema or Code First

  • Before using this Boilerplate it is recommended that you know Schema-First GraphQL Development
  • Type-GraphQL lies on Code First while Prisma on Schema-First

Why Type-GraphQL for SDL Development

  1. You can use a single class for both a db model and graphql model
  2. Way smoother to code (generating types is clunky)
  3. The schema + resolver can be together in the same place

Create & Access DB (PostgreSQL Windows)

Implemented

  • Register - Done
  • Validation - Done
  • Login - Done
  • Authorization Roles - Done
  • Authorization Middleware - Done
  • Confirmation Email - Done
  • Forgot/Change Password - Done
  • Logout - Done
  • Test Environment (ts-jest) - Done
  • Pagination - Done
  • Rate Limiting - Done
  • Higher Order Resolver - 🏃
  • File/Image Multi-upload - Done - Minor Issues
  • Query Complexity - Done
  • Time Performance GraphQL Resolver - 🏃
  • Locking Accounts - 🏃
  • JWT Authentication (Access/Refresh Tokens, Revoking) - Done

Plans

  • Will try to migrate to Rust

Tests

    // add this back if file upload won't work
    "resolutions": {
      "**/**/fs-capacitor": "^6.2.0",
      "**/graphql-upload": "^11.0.0"
    }

Sources

graphql-ts-server's People

Contributors

barryblando avatar

Stargazers

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

Watchers

 avatar  avatar

graphql-ts-server's Issues

TypeORM out of date

Plans

  • If I won't see any more updates from TypeOrm maintainers, `will decide to use Objection.js & Knex.js
  • Still working on Rust version

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.