{"id":15130242,"url":"https://github.com/theopenlane/gqlgen-plugins","last_synced_at":"2026-02-17T23:10:27.815Z","repository":{"id":254916648,"uuid":"847463124","full_name":"theopenlane/gqlgen-plugins","owner":"theopenlane","description":"plugins used in the gqlgen code generation lifecycle","archived":false,"fork":false,"pushed_at":"2026-01-29T01:37:11.000Z","size":278,"stargazers_count":6,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-29T11:17:43.298Z","etag":null,"topics":["codegen","gqlgen","gqlgen-hooks","graphql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/theopenlane.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-08-25T22:14:45.000Z","updated_at":"2026-01-28T20:41:10.000Z","dependencies_parsed_at":"2026-01-28T23:01:27.071Z","dependency_job_id":null,"html_url":"https://github.com/theopenlane/gqlgen-plugins","commit_stats":null,"previous_names":["theopenlane/gqlgen-plugins"],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/theopenlane/gqlgen-plugins","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenlane%2Fgqlgen-plugins","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenlane%2Fgqlgen-plugins/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenlane%2Fgqlgen-plugins/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenlane%2Fgqlgen-plugins/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/theopenlane","download_url":"https://codeload.github.com/theopenlane/gqlgen-plugins/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/theopenlane%2Fgqlgen-plugins/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29561816,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-17T21:50:49.831Z","status":"ssl_error","status_checked_at":"2026-02-17T21:46:15.313Z","response_time":100,"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":["codegen","gqlgen","gqlgen-hooks","graphql"],"created_at":"2024-09-26T02:42:50.863Z","updated_at":"2026-02-17T23:10:27.786Z","avatar_url":"https://github.com/theopenlane.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/theopenlane/gqlgen-plugins)](https://goreportcard.com/report/github.com/theopenlane/gqlgen-plugins)\n[![Build status](https://badge.buildkite.com/651bd9d2d92df64fcab6bab5db1842565d29c48ade77b52bd7.svg)](https://buildkite.com/theopenlane/gqlgen-plugins?branch=main)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=theopenlane_gqlgen-plugins\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=theopenlane_gqlgen-plugins)\n[![License: Apache 2.0](https://img.shields.io/badge/License-Apache2.0-brightgreen.svg)](https://opensource.org/licenses/Apache-2.0)\n\n# gqlgen-plugins\n\n[gqlgen](https://gqlgen.com/reference/plugins/) provides a way to hook into the\ngqlgen code generation lifecycle. This repo contains several hooks that can be\nused:\n\n- bulkgen\n- resovlergen\n- searchgen\n- fieldgen\n\n## ResolverGen\n\nThis hook will override the default generated resolver functions with the\ntemplates for CRUD operations.\n\n## BulkGen\n\nCreates resolvers to do bulk operations for a schema for both bulk input or a\ncsv file upload input.\n\n## FieldGen\n\nThis plugin is designed to programmatically add additional fields to your graphql schema based on existing fields\nin the schema or the schema name\n\n## SearchGen\n\nCreates search resolvers to search on fields within the ent schema. You must\npass in the package import name of the `generated` ent code, e.g.\n`github.com/theopenlane/core/internal/ent/generated`. If the package is not\nnamed `generated` it is added as an alias.\n\n```go\napi.AddPlugin(searchgen.New(\"github.com/theopenlane/core/internal/ent/generated\")), // add the search plugin\n```\n\n## Usage\n\nAdd the plugins to the `generate.go` `main` function to be included in the\nsetup:\n\n```go\nfunc main() {\n\tcfg, err := config.LoadConfigFromDefaultLocations()\n\tif err != nil {\n\t\tfmt.Fprintln(os.Stderr, \"failed to load config\", err.Error())\n\t\tos.Exit(2)\n\t}\n\n\tif err := api.Generate(cfg,\n\t\tapi.ReplacePlugin(resolvergen.New()), // replace the resolvergen plugin\n\t\tapi.AddPlugin(bulkgen.New()),         // add the bulkgen plugin\n\t\tapi.AddPlugin(searchgen.New(\"github.com/theopenlane/core/internal/ent/generated\")), // add the search plugin\n\t); err != nil {\n\t\tfmt.Fprintln(os.Stderr, err.Error())\n\t\tos.Exit(3)\n\t}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheopenlane%2Fgqlgen-plugins","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftheopenlane%2Fgqlgen-plugins","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftheopenlane%2Fgqlgen-plugins/lists"}