{"id":21192685,"url":"https://github.com/sijad/entgql","last_synced_at":"2026-04-30T06:34:35.014Z","repository":{"id":57543162,"uuid":"293912380","full_name":"sijad/entgql","owner":"sijad","description":"CRUD gqlgen code generator for ent models","archived":false,"fork":false,"pushed_at":"2020-09-17T18:18:43.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-15T15:17:38.943Z","etag":null,"topics":["code-generator","crud","ent","gqlgen","graphql"],"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/sijad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-09-08T19:50:33.000Z","updated_at":"2021-02-07T11:13:22.000Z","dependencies_parsed_at":"2022-09-26T18:31:26.853Z","dependency_job_id":null,"html_url":"https://github.com/sijad/entgql","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sijad/entgql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sijad%2Fentgql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sijad%2Fentgql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sijad%2Fentgql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sijad%2Fentgql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sijad","download_url":"https://codeload.github.com/sijad/entgql/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sijad%2Fentgql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32457110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T22:27:22.272Z","status":"online","status_checked_at":"2026-04-30T02:00:05.929Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["code-generator","crud","ent","gqlgen","graphql"],"created_at":"2024-11-20T19:10:49.004Z","updated_at":"2026-04-30T06:34:34.988Z","avatar_url":"https://github.com/sijad.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e🚧🚧 this is pre-alpha software 🚧🚧\u003c/p\u003e\n\n\u003ch1 align=\"center\"\u003eentgql\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003cstrong\u003eSimple\u003c/strong\u003e, \u003cstrong\u003eEfficient\u003c/strong\u003e, \u003cstrong\u003eCRUD GraphQL API\u003c/strong\u003e Generator for \u003ca href=\"https://entgo.io/\"\u003eent.\u003c/a\u003e and \u003ca href=\"https://gqlgen.com/\"\u003egqlgen\u003c/a\u003e\n\u003c/p\u003e\n\n### Quick Start\n\nit's recommended to install entgql using [Go modules](https://github.com/golang/go/wiki/Modules#quick-start).\n\n1. create [a new gqlgen project](https://gqlgen.com/getting-started/)\n2. [install ent.](https://entgo.io/docs/getting-started/) and generate your models\n3. install entgql by running `go get github.com/sijad/entgql/cmd/entgql`\n4. generate CRUD code for your ent schema using `go run github.com/sijad/entgql/cmd/entgql generate ./ent/schema`\n5. edit `./graph/resolver.go` and add ent client to the resolver struct:\n```diff\n-type Resolver struct{}\n+import \"your.com/project/path/ent\"\n+\n+type Resolver struct {\n+\tEntClient *ent.Client\n+}\n```\n6. edit `./server.go` to [create a new client](https://entgo.io/docs/crud/#create-a-new-client) and pass it to resolvers:\n```diff\n+import \"your.com/project/path/ent\"\n+import _ \"your.com/dialect/driver\"\n\nfunc main() {\n// ...\n+\tclient, err := ent.Open(\"dialect-name\", \"dialet-options\")\n+\tif err != nil {\n+\t\tlog.Fatal(err)\n+\t}\n+\tdefer client.Close()\n\n-\tsrv := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: \u0026graph.Resolver{}}))\n+\tsrv := handler.NewDefaultServer(generated.NewExecutableSchema(generated.Config{Resolvers: \u0026graph.Resolver{EntClient: client}}))\n// ...\n```\n7. start your GraphQL server `go run server.go`\n\n### Credits\n\ninspired by [Nexus](https://www.nexusjs.org/) and [PostGraphile](https://www.graphile.org/postgraphile/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsijad%2Fentgql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsijad%2Fentgql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsijad%2Fentgql/lists"}