ctco / nodejs-graphql-template

Template project for Node.js® GraphQL APIs
MIT License
14 stars 3 forks source link
apollo-server docker graphql graphql-playground graphql-tools graphql-voyager jest koa nock nodejs template typescript yarn

[Maintenance]() PRs Welcome Build Status TravisCI Build Status AppVeyor dependencies Status devDependencies Status

nodejs-graphql-template

Node.js, Koa, GraphQL and TypeScript template project.

Batteries and opinions included :raised_hands:

Features

Required Software

or

Install

Develop

Attention Windows users: when Docker for Windows is not an option, install yarn and run $ yarn && yarn docker-mount beforehand.

Generate TypeScript types for GraphQL schema and default GraphQL resolvers

$ yarn gqlgen

Test

single test run

Run unit tests

$ yarn test:unit

Run integration tests

$ yarn test:integration

Run all tests

$ yarn test

Run e2e tests

Run the app or point E2E_TEST_URL to a remote instance you want to test against.

$ yarn test:e2e

Generate coverage reports

Set environment variable CI to true to generate coverage reports.

In *nix:

CI=true yarn test

In Windows:

set CI=true&&yarn test

Build

$ yarn build or $ docker build .

Tech Stack