Go GraphQL Server/Client Example
GraphQL server/client example for Go.
Development Environment:
Usage
After git clone this repo, generate and run server:
$ cd /path/to/this/repo/
$ cd server/
# Install github.com/99designs/gqlgen
$ make install
# go generate server code
$ make generate
# Run server
$ make
After server is running, you use curl to send test request to server:
$ make curl
You can also use client to send test request to server:
$ cd /path/to/this/repo/
$ cd client/
$ make
See Makefile in server/
and client/
directories for actual commands.
UNLICENSE
Released in public domain. See UNLICENSE.
References
[1] | github.com/99designs/gqlgen |
[2] | github.com/machinebox/graphql |
[3] | go - What is the correct shape of a curl POST request to a gqlgen GraphQL API? - Stack Overflow |