{"id":13561920,"url":"https://github.com/vendrinc/elm-gql","last_synced_at":"2026-03-16T11:04:18.118Z","repository":{"id":59032526,"uuid":"535121758","full_name":"vendrinc/elm-gql","owner":"vendrinc","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-14T20:04:16.000Z","size":3985,"stargazers_count":70,"open_issues_count":20,"forks_count":13,"subscribers_count":26,"default_branch":"main","last_synced_at":"2025-09-07T01:31:42.989Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/elm-gql","language":"Elm","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vendrinc.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-10T21:19:36.000Z","updated_at":"2025-07-25T23:37:32.000Z","dependencies_parsed_at":"2024-02-12T20:28:53.081Z","dependency_job_id":"86cbc72d-070f-4792-bfee-57694c9ee449","html_url":"https://github.com/vendrinc/elm-gql","commit_stats":{"total_commits":633,"total_committers":10,"mean_commits":63.3,"dds":"0.12480252764612954","last_synced_commit":"03b11bced8bba90aa85bdfeccae8e7ccd5c57449"},"previous_names":[],"tags_count":26,"template":false,"template_full_name":null,"purl":"pkg:github/vendrinc/elm-gql","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendrinc%2Felm-gql","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendrinc%2Felm-gql/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendrinc%2Felm-gql/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendrinc%2Felm-gql/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vendrinc","download_url":"https://codeload.github.com/vendrinc/elm-gql/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vendrinc%2Felm-gql/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278254666,"owners_count":25956644,"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-10-04T02:00:05.491Z","response_time":63,"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":[],"created_at":"2024-08-01T13:01:02.577Z","updated_at":"2025-10-04T02:27:00.254Z","avatar_url":"https://github.com/vendrinc.png","language":"Elm","funding_links":[],"categories":["Code generators","Elm"],"sub_categories":["Individual Podcast episodes"],"readme":"# Write GQL, get Elm\n\nGraphQL and Elm have very similar type systems!\n\nWith this library you can write GraphQL queries and mutations directly and receive nice Elm code for you to use them.\n\nThis saves a ton of time! And maintains that lovely typesafety you're probably used to in Elm.\n\n1. GraphQL itself is relatively easy to write once you get the hang of it.\n2. `elm-gql` verifies everything you've written against the GraphQL schema, so you don't have to worry about writing an incorrect query or mutation.\n3. `elm-gql` has nice, elm-esque error messages.\n\n![](/guide/assets/VariableError.png)\n\nThis library has been in use at vendr.com for over a year in production! We've built a number of complex app features using it and generally enjoy working with it.\n\n# Getting started\n\n```bash\nnpm install elm-gql --save-dev\n```\n\nOnce you have `elm-gql` installed, you'll need to get set up by requesting the GraphQL schema for the API you care about.\n\n```sh\n# Start your project by running init\nelm-gql init https://api.github.com/graphql --header \"Authorization: bearer TOKEN\"\n\n```\n\nThis will do a few things!\n\n1. Any `*.gql` files in your project will be checked against the schema. You'll either get a nice error message describing what needs to be adjusted in the file, or it'll generate some Elm code for you to use to make that query/mutation in Elm.\n\n2. Generate some helper code under in a folder called `Api`. (Note, you can change this base name by passing `--namespace MyApi` to the `elm-gql` command). These files will:\n   - Help you construct inputs to your query\n   - Allow you to reference any Enums in your GraphQL.\n\nWhen you make a change to a query or mutation, just run\n\n```bash\nelm-gql run ./api/Api/schema.json\n```\n\nand everything will be checked and generated again.\n\n## Guides\n\n- [The Life of a Query](https://github.com/vendrinc/elm-gql/blob/main/guide/LifeOfAQuery.md)\n- [Code Reuse and Patterns](https://github.com/vendrinc/elm-gql/blob/main/guide/CodePatterns.md)\n- [Check out the Github Example Repo](https://github.com/mdgriffith/elm-gql-github-example)\n\n## Talk to me in the Elm-GQL Slack or Discord!\n\nIf you have any further questions or feedback, there is both\n\n- [The #graphql channel in the Elm slack](https://elm-lang.org/community/slack) which is for people who are getting started with `elm-gql` or want to find people to help them debug a situation.\n- [The #elm-gql channel in the \"Incremental Elm\" Discord](https://incrementalelm.com/chat/) which is where I discuss future development of `vendr/elm-gql` and coordinate with collaborators, but I'm also happy to hear about initial experiences.\n\nSee you in there :wave:!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendrinc%2Felm-gql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvendrinc%2Felm-gql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvendrinc%2Felm-gql/lists"}