1.0.0 • Published 6 years ago

mini-graphql v1.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

A small GraphQL server

using micro, microrouter, and apollo-server-micro

Install

git clone https://github.com/benjaminboruff/mini-graphql.git

cd mini-graphql && yarn

Usage
  • Development - watches and builds ES* in one terminal, and runs micro-dev in another.

    In one terminal:

    yarn dev:babel

    In another terminal:

    yarn dev:micro

  • Build and start server - compiles using babel, and starts the production micro server.

    yarn start

  • Make a production build in dist/

    yarn build

  • A simple client data request using curl

    curl -XPOST -H "Content-Type:application/json" -d '{"query": "{books { title author}}"}' http://localhost:3000/graphql