{"id":37204622,"url":"https://github.com/pleclech/gqlgenc","last_synced_at":"2026-01-14T23:35:19.645Z","repository":{"id":57625696,"uuid":"400707724","full_name":"pleclech/gqlgenc","owner":"pleclech","description":"This is Go library for building GraphQL client with gqlgen","archived":false,"fork":true,"pushed_at":"2021-08-28T05:29:37.000Z","size":539,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-06-20T08:07:13.018Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"Yamashou/gqlgenc","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pleclech.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":"2021-08-28T05:12:41.000Z","updated_at":"2021-08-28T05:28:40.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/pleclech/gqlgenc","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/pleclech/gqlgenc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleclech%2Fgqlgenc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleclech%2Fgqlgenc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleclech%2Fgqlgenc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleclech%2Fgqlgenc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pleclech","download_url":"https://codeload.github.com/pleclech/gqlgenc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pleclech%2Fgqlgenc/sbom","scorecard":{"id":737603,"data":{"date":"2025-08-11","repo":{"name":"github.com/pleclech/gqlgenc","commit":"8bcd1ea0da54420fa08c9ddf05ed99e974cb5734"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/pleclech/gqlgenc/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/pleclech/gqlgenc/go.yml/master?enable=pin","Warn: downloadThenRun not pinned by hash: .github/workflows/go.yml:29","Warn: downloadThenRun not pinned by hash: .github/workflows/go.yml:35","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 goCommand dependencies pinned","Info:   0 out of   2 downloadThenRun dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":9,"reason":"1 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2024-2920 / GHSA-2hmf-46v7-v6fx"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-22T16:21:43.536Z","repository_id":57625696,"created_at":"2025-08-22T16:21:43.542Z","updated_at":"2025-08-22T16:21:43.542Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28438865,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T22:37:52.437Z","status":"ssl_error","status_checked_at":"2026-01-14T22:37:31.496Z","response_time":107,"last_error":"SSL_read: 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":[],"created_at":"2026-01-14T23:35:19.017Z","updated_at":"2026-01-14T23:35:19.637Z","avatar_url":"https://github.com/pleclech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gqlgenc\n\n## What is gqlgenc ?\n\nThis is Go library for building GraphQL client with [gqlgen](https://github.com/99designs/gqlgen)\n\n## Motivation\n\nNow, if you build GraphQL api client for Go, have choice:\n \n - [github.com/shurcooL/graphql](https://github.com/shurcooL/graphql)\n - [github.com/machinebox/graphql](https://github.com/machinebox/graphql)\n\nThese libraries are very simple and easy to handle. \nHowever, as I work with [gqlgen](https://github.com/99designs/gqlgen) and [graphql-code-generator](https://graphql-code-generator.com/) every day, I find out the beauty of automatic generation.\nSo I want to automatically generate types. \n\n## Installation\n\n```shell script\ngo get -u github.com/Yamashou/gqlgenc\n```\n\n## How to use\n\n### Client Codes Only\n\ngqlgenc base is gqlgen with [plugins](https://gqlgen.com/reference/plugins/). So the setting is yaml in each format.  \ngqlgenc can be configured using a `.gqlgenc.yml` file\n\nLoad a schema from a remote server:\n\n```yaml\nmodel:\n  package: generated\n  filename: ./models_gen.go # https://github.com/99designs/gqlgen/tree/master/plugin/modelgen\nclient:\n  package: generated\n  filename: ./client.go # Where should any generated client go?\nmodels:\n  Int:\n    model: github.com/99designs/gqlgen/graphql.Int64\n  Date:\n    model: github.com/99designs/gqlgen/graphql.Time\nendpoint:\n  url: https://api.annict.com/graphql # Where do you want to send your request?\n  headers:　# If you need header for getting introspection query, set it\n    Authorization: \"Bearer ${ANNICT_KEY}\" # support environment variables\nquery:\n  - \"./query/*.graphql\" # Where are all the query files located?\n```\n\nLoad a schema from a local file:\n\n```yaml\nmodel:\n  package: generated\n  filename: ./models_gen.go # https://github.com/99designs/gqlgen/tree/master/plugin/modelgen\nclient:\n  package: generated\n  filename: ./client.go # Where should any generated client go?\nmodels:\n  Int:\n    model: github.com/99designs/gqlgen/graphql.Int64\n  Date:\n    model: github.com/99designs/gqlgen/graphql.Time\nschema:\n  - \"schema/**/*.graphql\" # Where are all the schema files located?\nquery:\n  - \"./query/*.graphql\" # Where are all the query files located?\n```\n\nExecute the following command on same directory for .gqlgenc.yml\n\n```shell script\ngqlgenc\n```\n\n### With gqlgen\n\nDo this when creating a server and client for Go.\nYou create your own entrypoint for gqlgen.\nThis use case is very useful for testing your server.\n\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"os\"\n\n\t\"github.com/Yamashou/gqlgenc/clientgen\"\n\n\t\"github.com/99designs/gqlgen/api\"\n\t\"github.com/99designs/gqlgen/codegen/config\"\n)\n\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\tqueries := []string{\"client.query\", \"fragemt.query\"}\n\tclientPackage := config.PackageConfig{\n\t\tFilename: \"./client.go\",\n\t\tPackage:  \"gen\",\n\t}\n\n\tclientPlugin := clientgen.New(queries, clientPackage)\n\terr = api.Generate(cfg,\n\t\tapi.AddPlugin(clientPlugin),\n\t)\n\tif err != nil {\n\t\tfmt.Fprintln(os.Stderr, err.Error())\n\t\tos.Exit(3)\n\t}\n}\n```\n\n## Documents\n\n- [How to configure gqlgen using gqlgen.yml](https://gqlgen.com/config/)\n- [How to write plugins for gqlgen](https://gqlgen.com/reference/plugins/)\n\n\n## Comments\n\n### Japanese Comments\nThese codes have Japanese comments. Replace with English.\n \n### Subscription\n\nThis client does not support subscription. If you need a subscription, please create an issue or pull request. \n\n### Pre-conditions\n\n[clientgen](https://github.com/Yamashou/gqlgenc/tree/master/clientgen) is created based on [modelgen](https://github.com/99designs/gqlgen/tree/master/plugin/modelgen). So if you don't have a modelgen, it may be a mysterious move.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpleclech%2Fgqlgenc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpleclech%2Fgqlgenc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpleclech%2Fgqlgenc/lists"}