{"id":15407245,"url":"https://github.com/peterfication/peak-tracker-ruby-graphql-codegen","last_synced_at":"2025-04-05T01:12:24.095Z","repository":{"id":206545612,"uuid":"716921195","full_name":"peterfication/peak-tracker-ruby-graphql-codegen","owner":"peterfication","description":null,"archived":false,"fork":false,"pushed_at":"2023-11-10T17:37:05.000Z","size":1049,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-02T05:34:28.637Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/peterfication.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-11-10T06:44:52.000Z","updated_at":"2023-11-10T06:45:22.000Z","dependencies_parsed_at":"2023-11-10T18:47:06.908Z","dependency_job_id":null,"html_url":"https://github.com/peterfication/peak-tracker-ruby-graphql-codegen","commit_stats":null,"previous_names":["peterfication/peak-tracker-ruby-graphql-codegen"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfication%2Fpeak-tracker-ruby-graphql-codegen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfication%2Fpeak-tracker-ruby-graphql-codegen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfication%2Fpeak-tracker-ruby-graphql-codegen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peterfication%2Fpeak-tracker-ruby-graphql-codegen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peterfication","download_url":"https://codeload.github.com/peterfication/peak-tracker-ruby-graphql-codegen/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247271527,"owners_count":20911587,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-10-01T16:27:59.563Z","updated_at":"2025-04-05T01:12:24.072Z","avatar_url":"https://github.com/peterfication.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# PeakTracker Ruby codegen\n\nExample project to demonstrate GraphQL codegen in a Ruby project.\n\n## Commands\n\nCommands are defined in the [`Justfile`](Justfile) and can be listed with [`just`](https://github.com/casey/just).\n\n```\njust graphql\n```\n\n## What it does\n\nThe first step retrieves the GraphQL schema from the [Peak Tracker backend](https://github.com/peterfication/peak_tracker_backend/) and saves it in [`graphql.schema.json`](./graphql.schema.json).\n\nThe main magic happens in [`graphql-codegen-peak-tracker.js`](./graphql-codegen-peak-tracker.js) which generates [`graphql_peak_tracker.rb`](./lib/peak_tracker/graphql_peak_tracker.rb). The generated Ruby classes are then used in the [`graphql`](./graphql) folder for the GraphQL schema.\n\nThe [Ruby query class](./graphql/types/query.rb) of this project just defines one field:\n\n```ruby\nfield(\n  :peaks,\n  PeakTracker::Types::PeakConnection,\n  null: false,\n  description: PeakTracker::Types::PeakConnection.description\n) do\n  PeakTracker::Types::Arguments.define_arguments(self, :ROOT_QUERY_TYPE, :peaks, %i[filter scaled_by_actor sort])\nend\n```\n\nBut the [resulting GraphQL schema](./graphql/schema.json) contains all arguments and sub-fields from the [original schema](./graphql.schema.json).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterfication%2Fpeak-tracker-ruby-graphql-codegen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeterfication%2Fpeak-tracker-ruby-graphql-codegen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeterfication%2Fpeak-tracker-ruby-graphql-codegen/lists"}