{"id":13514222,"url":"https://github.com/novacloudcz/graphql-orm","last_synced_at":"2026-03-12T01:45:44.952Z","repository":{"id":52239240,"uuid":"188660554","full_name":"novacloudcz/graphql-orm","owner":"novacloudcz","description":"Golang GraphQL API generator using gqlgen and gorm","archived":false,"fork":false,"pushed_at":"2023-02-25T03:10:01.000Z","size":360,"stargazers_count":82,"open_issues_count":5,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-13T22:43:26.833Z","etag":null,"topics":["apollo-federation","generator","golang","gorm","gqlgen","graphql","graphql-orm","orm"],"latest_commit_sha":null,"homepage":null,"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/novacloudcz.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-05-26T08:54:55.000Z","updated_at":"2025-05-17T06:17:06.000Z","dependencies_parsed_at":"2024-01-13T19:24:37.948Z","dependency_job_id":"d655c93d-684c-4d24-a643-ed22044d8a5d","html_url":"https://github.com/novacloudcz/graphql-orm","commit_stats":null,"previous_names":[],"tags_count":59,"template":false,"template_full_name":null,"purl":"pkg:github/novacloudcz/graphql-orm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novacloudcz%2Fgraphql-orm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novacloudcz%2Fgraphql-orm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novacloudcz%2Fgraphql-orm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novacloudcz%2Fgraphql-orm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/novacloudcz","download_url":"https://codeload.github.com/novacloudcz/graphql-orm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/novacloudcz%2Fgraphql-orm/sbom","scorecard":{"id":695510,"data":{"date":"2025-08-11","repo":{"name":"github.com/novacloudcz/graphql-orm","commit":"aa1e22731f021ff9b947500ba63b9ea3981a1ec1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.5,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/29 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":"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":"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":"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":"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":"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":"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":"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":"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:44: update your workflow using https://app.stepsecurity.io/secureworkflow/novacloudcz/graphql-orm/go.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:47: update your workflow using https://app.stepsecurity.io/secureworkflow/novacloudcz/graphql-orm/go.yml/master?enable=pin","Warn: containerImage not pinned by hash: test/Dockerfile:1","Warn: containerImage not pinned by hash: test/Dockerfile:9","Warn: containerImage not pinned by hash: test/Dockerfile:11: pin your Docker image by updating alpine:3.5 to alpine:3.5@sha256:66952b313e51c3bd1987d7c4ddf5dba9bc0fb6e524eed2448fa660246b3e76ec","Warn: goCommand not pinned by hash: .github/workflows/go.yml:53","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 containerImage dependencies pinned","Info:   0 out of   1 goCommand 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":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 5 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"14 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GO-2022-0942 / GHSA-h3qm-jrrf-cgj3","Warn: Project is vulnerable to: GO-2022-0229 / GHSA-cjjc-xp8v-855w","Warn: Project is vulnerable to: GO-2020-0012 / GHSA-ffhg-7mh4-33c4","Warn: Project is vulnerable to: GO-2021-0227 / GHSA-3vm4-22fp-5rfm","Warn: Project is vulnerable to: GO-2022-0968 / GHSA-gwc9-m7rh-j2ww","Warn: Project is vulnerable to: GO-2021-0356 / GHSA-8c26-wmh5-6g9v","Warn: Project is vulnerable to: GO-2024-2961","Warn: Project is vulnerable to: GO-2023-2402 / GHSA-45x7-px36-x8w8","Warn: Project is vulnerable to: GO-2024-3321 / GHSA-v778-237x-gjrc","Warn: Project is vulnerable to: GO-2025-3487 / GHSA-hcg3-q754-cr77","Warn: Project is vulnerable to: GO-2022-0493 / GHSA-p782-xgp4-8hr8","Warn: Project is vulnerable to: GO-2025-3553 / GHSA-mh63-6h87-95cp","Warn: Project is vulnerable to: GO-2024-2920 / GHSA-2hmf-46v7-v6fx","Warn: Project is vulnerable to: GO-2022-0603 / GHSA-hp87-p4gw-j4gq"],"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-22T03:33:30.186Z","repository_id":52239240,"created_at":"2025-08-22T03:33:30.187Z","updated_at":"2025-08-22T03:33:30.187Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30412099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T00:40:14.898Z","status":"ssl_error","status_checked_at":"2026-03-12T00:40:08.439Z","response_time":84,"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":["apollo-federation","generator","golang","gorm","gqlgen","graphql","graphql-orm","orm"],"created_at":"2024-08-01T05:00:50.028Z","updated_at":"2026-03-12T01:45:44.932Z","avatar_url":"https://github.com/novacloudcz.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# graphql-orm\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/novacloudcz/graphql-orm)](https://goreportcard.com/report/github.com/novacloudcz/graphql-orm)\n\nGolang GraphQL API generator using [gqlgen](https://gqlgen.com) and [gorm](https://gorm.io)\n\n## Why\n\nWhile following microservices design patterns we ended up with many \"model services\". gqlgen is perfect tool, but implementing resolvers in every service is getting more and more cumbersome. Using this tool we only have to update `model.graphql` and all resolvers get generated automatically.\n\n## Installation\n\nBefore you start, please make sure you have `goimports` installed:\n\n```sh\ngo get golang.org/x/tools/cmd/goimports\n```\n\n_NOTE: Make sure you have Go installed on your system._\n\n1. Create new project repository\n1. run `go mod init [MODULE]` to initialize your project with go modules\n1. run `go run github.com/novacloudcz/graphql-orm init`\n1. all necessary files should be created and You can run `make run` to start service with dummy model\n1. to update model open crated `model.graphql` and create your custom model schema\n1. each time you change model, run `make generate` or `go run github.com/novacloudcz/graphql-orm` to recreate generated source codes\n\n_NOTE: graphql-orm requires Go modules for installation. If you are running in \\$GOPATH, make sure you are running init command with GO111MODULE=on_\n\n## Running locally\n\nFor running locally you can use:\n\n```sh\nmake run\n```\n\nor without makefile:\n\n```sh\nDATABASE_URL=sqlite3://test.db PORT=8080 go run *.go\n```\n\n## Environment variables\n\n- `DATABASE_URL` - connection string for database in format `db://user:password@host:port/tablename` (eg. `mysql://root:pass@localhost:3306/test`; required)\n- `EXPOSE_MIGRATION_ENDPOINT` - expose `/migration` endpoint which triggers database migration (migrates to latest database schema; default: false)\n- `TABLE_NAME_PREFIX` - set global prefix for all table names (default: \"\")\n- `EVENT_TRANSPORT_URL` - destination url for sending mutation events (array supported in format `EVENT_TRANSPORT_URL_[INDEX]`) see [Events transport](#installation)\n- `EVENT_TRANSPORT_SOURCE` - custom value for CloudEvent source attribute (default: `http://{hostname}/graphql`)\n\n### Sqlite connection\n\nIn case you want to connect with sqlite, you can use local file storage:\n`sqlite3://path/to/file.db`\n\nOr use in-memory storage:\n`sqlite3://:memory:`\n\n## Example\n\nYou can find example project at [graphql-orm-example repo](https://github.com/novacloudcz/graphql-orm-example)\n\n## Schema preview in Voyager\n\n[GraphQL Voyager](https://apis.guru/graphql-voyager/) is very nice tool for previewing your GraphQL Schema, you can run it locally by:\n\n```sh\nmake voyager\n```\n\nor without makefile:\n\n```sh\ndocker run --rm -v `pwd`/gen/schema.graphql:/app/schema.graphql -p 8080:80 graphql/voyager\n```\n\n...after voyager starts up go to https://localhost:8080\n\nAll generated stuff is stored in `./gen/` folder.\n\n## Building docker image\n\nIf you generated Dockerfile initialization it's as easy as running:\n\n```sh\ndocker build -t {IMAGE_NAME} .\n```\n\nIf you want to create your own docker image, you can check the example repository for generated Dockerfile: https://github.com/novacloudcz/graphql-orm-example/blob/master/Dockerfile\n\n## Events transport\n\nFor event driven architecture it's necessary that the service is able to send events about changes in state.\nServices built using this library automatically send event for every mutation using CloudEvents (entity created/updated/deleted and changed column and their values). Supported targets are:\n\n- HTTP/HTTPS\n- AWS Services using [cloudevents-aws-transport](github.com/jakubknejzlik/cloudevents-aws-transport) (SNS/SQS/EventBridge)\n\nFor more information about event structure see: https://github.com/novacloudcz/graphql-orm/blob/master/events/model.go\n\n## Migrations and automigrations\n\nSince version `0.4.0` the migrations using gormigrate are introduced and it's possible to write custom migrations with rollbacks.\nThe automigration (with foreign keys) is still available, but gormigrate migrations are used by default. You use following commands:\n\n- `make migrate` - runs gormigrate migrations\n- `make automigrate` - runs gorm basic automigration\n\nThe same applies for HTTP endpoints (when `EXPOSE_MIGRATION_ENDPOINT=true`):\n\n- `POST /migrate` - runs gormigrate migrations\n- `post /automigrate` - runs gorm basic automigration\n\nTo add new migration, edit `src/migrations` file and its GetMigrations method. For more information see [gormigrate Readme](https://github.com/go-gormigrate/gormigrate)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovacloudcz%2Fgraphql-orm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnovacloudcz%2Fgraphql-orm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnovacloudcz%2Fgraphql-orm/lists"}