An example Golang server that uses GraphQL and Relay.
- graphql-go: Golang GraphQL library
- graphql-relay-go: Golang GraphQL library helper to construct Relay-compliant server
- graphql-hander: Golang HTTP.Handler for graphl-go
-
Make sure you have go installed.
-
Make sure you have
GOPATH
set to the directory where this project is installed:
$ export GOPATH=`pwd`
- Run the app:
$ go run main.go
$ curl -X POST http://localhost:3000/graphql -H 'Content-Type: application/graphql' -d 'query Root{ hello }'
How to do stuff with Docker.
$ docker build -t hello_go .
$ docker run --publish 3000:3000 --name hello_go --rm hello_go
$ docker stop hello_go