This is a demo project implementing several graphQL-related techniques in go. And also to be served as a resource for my future referencing.
Run MySQL in docker
docker run --name gql-todo-mysql \
-p 3306:3306 \
-e MYSQL_ROOT_PASSWORD=myrootsecretpassword \
-e MYSQL_USER=user \
-e MYSQL_PASSWORD=mysecretpassword \
-e MYSQL_DATABASE=gql-todo \
-d mysql:8.0.32
Create gql-todo database
docker exec -it gql-todo-mysql bash
mysql -u root -p
#myrootsecretpassword
CREATE DATABASE gql-todo
Run Application
go run server.go
- Custom Data Validation
- Cursor-based pagination - Connections
- Optimizing N+1 database queries