express-graphql-api icon indicating copy to clipboard operation
express-graphql-api copied to clipboard

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

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