{"id":16393578,"url":"https://github.com/tk42/bff-gqlgen-sqlc-template","last_synced_at":"2026-05-07T17:40:17.007Z","repository":{"id":64301599,"uuid":"570285967","full_name":"tk42/bff-gqlgen-sqlc-template","owner":"tk42","description":"BFF(Backend For Frontend) with GraphQL generated its DB schema (postgres) by sqlc.","archived":false,"fork":false,"pushed_at":"2022-12-02T10:00:57.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-16T06:04:34.446Z","etag":null,"topics":["golang","graphql","graphql-editor","pgweb","postgres","sqlc"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tk42.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-24T19:45:36.000Z","updated_at":"2022-12-11T03:34:35.000Z","dependencies_parsed_at":"2023-01-15T09:31:11.624Z","dependency_job_id":null,"html_url":"https://github.com/tk42/bff-gqlgen-sqlc-template","commit_stats":null,"previous_names":[],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/tk42/bff-gqlgen-sqlc-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tk42%2Fbff-gqlgen-sqlc-template","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tk42%2Fbff-gqlgen-sqlc-template/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tk42%2Fbff-gqlgen-sqlc-template/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tk42%2Fbff-gqlgen-sqlc-template/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tk42","download_url":"https://codeload.github.com/tk42/bff-gqlgen-sqlc-template/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tk42%2Fbff-gqlgen-sqlc-template/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32749548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-07T02:14:30.463Z","status":"ssl_error","status_checked_at":"2026-05-07T02:14:29.405Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["golang","graphql","graphql-editor","pgweb","postgres","sqlc"],"created_at":"2024-10-11T04:53:40.470Z","updated_at":"2026-05-07T17:40:16.987Z","avatar_url":"https://github.com/tk42.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bff-gqlgen-sqlc-template\nBFF(Backend For Frontend) with GraphQL generated its DB schema (postgres) by sqlc.\n\n - 99designs/gqlgen\n - vektah/dataloaden\n - kjconroy/sqlc\n\n## Quickstart\n 1. Create `.graphql`\n    1. Create a new project in hygraph / strapi\n    2. Edit the schema on the browser\n    3. Fill `ACCESS_TOKEN`, `ENDPOINT` in `.env.local`\n    4. `docker compose run export` creates `schema.graphql`\n 2. Generate autostub codes in `/gen`\n    1. **Write `schema.sql`**\n    2. **Write `queries.sql`**\n    3. **Edit generate code for each model in `dataloaders/generate.go`**\n    4. Generate files in `/gen` by `docker compose -f docker-compose.autogen up`\n 3. Fill the autostub codes.\n    1. **Write `resolver/resolvers.go` to pass queries to `detaloaders` and mutations to `repository`**\n    2. **Fill `repository/relations.go` only for entities with relations**\n    3. **Fill `dataloaders/dataloaders.go`**\n 4. To migrate tables, write down DDL in `schema.sql` on [pgweb](http://localhost:8081)\n\n## Run GraphQL Server\n```\ndocker compose up\n```\nThen access [Playground](http://localhost:8080).\n\nIf you want to see raw database or query it, you can access [pgweb](http://localhost:8081)\n\nIf you want to try GraphQL API with Insomnia, you can import `Insomnia.yaml`.\n\n## Special thanks\n[fwojciec/gqlgen-sqlc-example](https://github.com/fwojciec/gqlgen-sqlc-example)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftk42%2Fbff-gqlgen-sqlc-template","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftk42%2Fbff-gqlgen-sqlc-template","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftk42%2Fbff-gqlgen-sqlc-template/lists"}