graphql-server icon indicating copy to clipboard operation
graphql-server copied to clipboard

Production-ready setup of GraphQL Express server based on Apollo Server.

graphql-server

This repository is designed to be a good starting point for a modern GraphQL Node server.

Apart from using industry-leading tools, it contributes to clean and maintainable architecture, which ensures best practices on writing and organizing server code. It also has the most essential configurations to grant great performance and uncompromised security to a server.

Features

Development

  • GraphiQL
  • Live reloading of GraphQL schema using webpack HMR
  • Jest as a testing framework

Production

  • Security essentials from Helmet
  • Seamless interdependent queries
  • Architecture ready for custom types, scalars, enums
  • Data-fetching logic decoupled from resolvers

Commands

Command name Description
npm start Launches development server.
npm test Executes tests.
npm run build Performs production build.
npm run server Serves the current production build.