koa-apollo-server-example icon indicating copy to clipboard operation
koa-apollo-server-example copied to clipboard

An example node.js GraphQL server that mainly demonstrates basic setup with Koa + Apollo Server + Knex + Basic Authentication(JWT)

koa-apollo-server-example

An example GraphQL server that mainly demonstrates basic setup with Koa + Apollo Server + Knex + Basic Authentication(JWT)

What's included

  • Babel & Nodemon Setup
  • Modularized Schema
  • DB Configuration
  • Basic Authentication & Authorization Usage
  • Environment Setup(ESLint & Prettier, Dotenv)

Installing / Getting started

# install dependencies
npm install

# serve using nodemon with hot reload
NODE_ENV=development npm run watch

# build for production with prettier and babel
npm run build

References

Why GraphQL?
Modularize schema
Modularize resolvers
Authentication
Authorization
GraphQL Best practice
How GraphQL turns a query into a response?
Babel, Nodemon setup