siongui / go-graphql-server-client-example

Example of Go GraphQL Server/Client

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go GraphQL Server/Client Example

https://goreportcard.com/badge/github.com/siongui/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

About

Example of Go GraphQL Server/Client

License:The Unlicense


Languages

Language:Go 72.4%Language:Makefile 27.6%