shammelburg / express-graphql-api

GraphQL Express server using Authentication middleware, Business layer Authorization, DataLoader and Subscriptions.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Express GraphQL API

My first attempt at GraphQL

Things I needed to figure out before really diving into GraphQL, such as, auth, n+1 problem, making database request, scalable folder structure, etc.

So I've put this project together to figure it out,

GraphQL is awesome!

To start

  • git clone https://github.com/shammelburg/express-graphql-api.git
  • cd express-graphql-api
  • npm install
  • npm start

To start with client sample project

Features

  • GraphiQL => http://localhost:4000/graphql
  • JSON database
  • Mulitple defType / resolver files
  • Authentication middleware with JWT
  • Business layer auth check and Authorization
  • DataLoader to solve N+1 problem
  • Error handling
  • Subscriptions with graphql-ws

User data from https://www.mockaroo.com/

Learning material

YouTube

LinkedIn

Repos

About

GraphQL Express server using Authentication middleware, Business layer Authorization, DataLoader and Subscriptions.

License:MIT License


Languages

Language:JavaScript 93.6%Language:Dockerfile 5.9%Language:Shell 0.5%