- Notifications
You must be signed in to change notification settings - Fork0
BFF(Backend For Frontend) with GraphQL generated its DB schema (postgres) by sqlc.
License
NotificationsYou must be signed in to change notification settings
tk42/bff-gqlgen-sqlc-template
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
BFF(Backend For Frontend) with GraphQL generated its DB schema (postgres) by sqlc.
- 99designs/gqlgen
- vektah/dataloaden
- kjconroy/sqlc
- Create
.graphql- Create a new project in hygraph / strapi
- Edit the schema on the browser
- Fill
ACCESS_TOKEN,ENDPOINTin.env.local docker compose run exportcreatesschema.graphql
- Generate autostub codes in
/gen- Write
schema.sql - Write
queries.sql - Edit generate code for each model in
dataloaders/generate.go - Generate files in
/genbydocker compose -f docker-compose.autogen up
- Write
- Fill the autostub codes.
- Write
resolver/resolvers.goto pass queries todetaloadersand mutations torepository - Fill
repository/relations.goonly for entities with relations - Fill
dataloaders/dataloaders.go
- Write
- To migrate tables, write down DDL in
schema.sqlonpgweb
docker compose upThen accessPlayground.
If you want to see raw database or query it, you can accesspgweb
If you want to try GraphQL API with Insomnia, you can importInsomnia.yaml.
About
BFF(Backend For Frontend) with GraphQL generated its DB schema (postgres) by sqlc.
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Uh oh!
There was an error while loading.Please reload this page.