{"id":18735423,"url":"https://github.com/codekeyz/gql_gapher","last_synced_at":"2025-09-01T02:32:06.510Z","repository":{"id":205329418,"uuid":"513960895","full_name":"codekeyz/gql_gapher","owner":"codekeyz","description":"Tired of writing your GraphQL queries \u0026 mutation as raw strings `r\"\"\" \"\"\"` in Dart and Flutter? 👋","archived":false,"fork":false,"pushed_at":"2023-11-10T23:08:01.000Z","size":50,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-02T07:11:24.741Z","etag":null,"topics":["code-generation","dart","flutter","graphql"],"latest_commit_sha":null,"homepage":"","language":"Dart","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/codekeyz.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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}},"created_at":"2022-07-14T15:51:00.000Z","updated_at":"2024-06-19T03:55:37.000Z","dependencies_parsed_at":"2023-11-10T23:20:11.200Z","dependency_job_id":"f5c70726-6c57-458a-a930-e8cd04b2340a","html_url":"https://github.com/codekeyz/gql_gapher","commit_stats":null,"previous_names":["codekeyz/gql_codegen","codekeyz/gql_gapher"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codekeyz/gql_gapher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekeyz%2Fgql_gapher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekeyz%2Fgql_gapher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekeyz%2Fgql_gapher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekeyz%2Fgql_gapher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codekeyz","download_url":"https://codeload.github.com/codekeyz/gql_gapher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codekeyz%2Fgql_gapher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273065036,"owners_count":25039274,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"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-generation","dart","flutter","graphql"],"created_at":"2024-11-07T15:16:54.629Z","updated_at":"2025-09-01T02:32:06.184Z","avatar_url":"https://github.com/codekeyz.png","language":"Dart","readme":"# gql_gapher\n\n[![Dart CI](https://github.com/codekeyz/gql_gapher/workflows/Dart/badge.svg)](https://github.com/codekeyz/gql_gapher/actions/workflows/dart.yml)\n\nTired of writing your queries \u0026 mutation as raw strings `r\"\"\" \"\"\"` in Dart and Flutter? 👋\n\nValidate and generate typed request classes for all your queries and mutations defined in GraphQL `(.graphql|.gql)` files. It also supports Fragments.\n\n## Usage\n\nAdd `gql_gapher` to your dev dependencies\n\n```yaml\ndev_dependencies:\n  gql_gapher: any   // required dart \u003e=2.12.0\n  build_runner:\n```\n\n### Write your queries \u0026 mutations\n\n```graphql\nmutation AuthenticateUser(\n  $first: String!\n  $second: Int!\n  $third: Boolean\n  $fourth: Float\n) {\n  authenticate(\n    input: {\n      firebase: { token: $first }\n      data: { attempt: $second }\n      amount: $third\n    }\n    rememberMe: $fourth\n  ) {\n    user {\n      id\n      email\n      phone\n    }\n  }\n}\n```\n\nthen run the generator\n\n```sh\n# dart\ndart pub run build_runner build\n\n# flutter\nflutter pub run build_runner build\n```\n\n### Use it\n\n```dart\nimport 'authenticate.g.dart';\n\nvoid main() {\n\n  final authPreq = AuthenticateUserRequest('First', 2, third: true, fourth: 2.3);\n\n  print(authPreq.query); // query\n\n  print(authPreq.variables); // variables\n\n  print(authPreq.operation); // AuthenticateUser\n}\n```\n\n## More\n\n### Fragments Support\n\nFragment Imports are supported as seen in the sample below.\n\n```graphql\n#import \"../fragments/user_fragment.graphql\"\n#import \"../fragments/location_fragment.graphql\"\n\nquery GetUser($token: String!) {\n  authenticate(input: { firebase: { token: $token } }, rememberMe: true) {\n    location {\n      name\n      latitude\n      longitude\n      ...LocationFragment\n    }\n    ...UserFragment\n  }\n}\n```\n\n## Contributors ✨\n\nContributions of any kind welcome!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekeyz%2Fgql_gapher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodekeyz%2Fgql_gapher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodekeyz%2Fgql_gapher/lists"}