A GraphQL API server written in Go.
- Todo CRUD
- User CRUD
- Basic Authorization
- Go 1.6+
- MySQL 5.6+ (Previous versions may still work but never tested)
- Install:
$ go install
- Setup new MySQL database
- Save database configuration in
config/database.json
- Migrate database:
$ graphql_api_go migrate
- Run the server
$ graphql_api_go server
Queries are sent as request payload of HTTP POST command with HTTP Basic Authentication header. Example using curl:
$ curl -X POST -u admin@example.com:password01 -d "{
__schema {
types {
name
kind
}
}
}" "http://localhost:8080/graphql"