Nothing fancy. Just trying out some basic backend. The main motivation is to see if it's viable to go schema-first for a backend application.
Database functions are generated from database migration files with sqlc and the API is generated from a GraphQL schema files using gqlgen.
The goal is to be able to focus on the business logic, and not re-implement things that are already defined in schemas.
- Add a new migration file into pkg/pgdb/schema
- Run the server (
go run server.go
)
- Add new queries or commands to
pkg/pgdb/query.sql
- Run
go generate ./...
- Make the necessary schema changes
- Run
go generate ./...