{"id":13475147,"url":"https://github.com/remorses/genql","last_synced_at":"2025-10-04T10:09:14.604Z","repository":{"id":37490669,"uuid":"264020206","full_name":"remorses/genql","owner":"remorses","description":"Type safe TypeScript client for any GraphQL API","archived":false,"fork":false,"pushed_at":"2025-02-03T17:38:53.000Z","size":8928,"stargazers_count":924,"open_issues_count":9,"forks_count":37,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-12T05:06:43.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://genql.dev","language":"TypeScript","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/remorses.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["remorses"]}},"created_at":"2020-05-14T20:39:29.000Z","updated_at":"2025-05-10T19:13:00.000Z","dependencies_parsed_at":"2024-03-30T14:26:49.915Z","dependency_job_id":"0c9f9b47-6eba-462a-934e-7021065511bb","html_url":"https://github.com/remorses/genql","commit_stats":{"total_commits":1033,"total_committers":12,"mean_commits":86.08333333333333,"dds":"0.21878025169409487","last_synced_commit":"cec400bc9069cdbdbcbed3a74dc9d41e37fc68ad"},"previous_names":[],"tags_count":207,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remorses%2Fgenql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remorses%2Fgenql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remorses%2Fgenql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/remorses%2Fgenql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/remorses","download_url":"https://codeload.github.com/remorses/genql/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254052668,"owners_count":22006716,"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-07-31T16:01:17.742Z","updated_at":"2025-10-04T10:09:09.586Z","avatar_url":"https://github.com/remorses.png","language":"TypeScript","readme":"\u003cdiv align='center'\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003cimg src='https://genql.dev/banner.png' width='380px'\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n    \u003ch3\u003eType safe Graphql query builder\u003c/h3\u003e\n    \u003ch4\u003eWrite Graphql queries with type validation and auto completion\u003c/h4\u003e\n    \u003cbr/\u003e\n    \u003cbr/\u003e\n\u003c/div\u003e\n\n\u003e [!IMPORTANT]\n\u003e Genql is building a cloud platform to automate SDK generation in multiple languages, docs website with examples, changelog website and more. \n\u003e Fill [this form](https://tally.so/r/mK1GWM) if you are interested!\n\nRead the [quick start guide](https://genql.dev/docs) to generate your client and start writing queries.\n\nYou can stay up to date with the latest changes subscribing to the [Genql changelog](https://changelog.genql.dev).\n\n**Features**\n\n-   ✅ Type completion \u0026 Type validation\n-   🍃 No dependencies (not even graphql)\n-   ⚡️ [Can easily fetch all scalar fields in a type](https://genql.dev/docs/usage/fetch-all-fields-on-a-type)\n-   🐎 [Works with any client (Apollo, Relay, etc)](https://genql.dev/docs/usage/integrate-with-other-graphql-clients)\n-   🥃 [Support for Subscriptions](https://genql.dev/docs/usage/subscriptions)\n-   🔋 [Built in batching support](https://genql.dev/docs/usage/batching-queries)\n-   ↔️ [Easy migrate existing GraphQL queries to Genql code](https://genql.dev/converter)\n-   🚂 Works in browser, Node, Deno, Cloudflare workers, Bun and more\n\n## Example\n\nFirst generate your client with the `genql` cli.\n\n\u003e You can find other cli options [here](https://genql.dev/docs/cli-reference)\n\n```sh\nnpm i -D @genql/cli # cli to generate the client code\ngenql --schema ./schema.graphql --output ./generated\n```\n\nThen you can use your client as follow\n\n```js\nimport { createClient, everything } from './generated'\nconst client = createClient()\n\nclient\n    .query({\n        countries: {\n            // pass arguments to the query\n            __args: {\n                filter: {\n                    currency: {\n                        eq: 'EUR',\n                    },\n                },\n            },\n            name: true,\n            code: true,\n            nestedField: {\n                // fetch all scalar fields\n                __scalar: true,\n            },\n        },\n    })\n    .then(console.log)\n```\n\nThe code above will fetch the graphql query below\n\n```graphql\nquery {\n    countries(filter: { currency: { eq: \"EUR\" } }) {\n        name\n        code\n        nestedField {\n            scalarField1\n            scalarField2\n        }\n    }\n}\n```\n\n## Why\n\nGenql has a lot of benefits over writing graphql queries by hand:\n\n-   Writing queries is faster thanks to TypeScript auto completion\n-   You can safely update your schema and be sure your queries are still valid\n-   You can fetch all scalar fields in a type with `__scalar: true`\n-   No `graphql` package dependency, no runtime parsing of queries\n-   You have to generate the client only after your schema changes, not after every query change\n\n---\n\n## Sponsors\n\n[**Notaku**](https://notaku.so)\n\n[![Notaku](https://notaku.so/github_banner.jpg)](https://notaku.so)\n\n[![Vercel](https://genql.dev/vercel-logo.svg)](https://vercel.com?utm_source=genql)\n\n---\n\n[Licensed under MIT]().\n","funding_links":["https://github.com/sponsors/remorses"],"categories":["TypeScript","Implementations"],"sub_categories":["JavaScript/TypeScript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremorses%2Fgenql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fremorses%2Fgenql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fremorses%2Fgenql/lists"}