{"id":25705793,"url":"https://github.com/namek/graphql2elm","last_synced_at":"2025-10-29T17:14:54.599Z","repository":{"id":74358978,"uuid":"122234250","full_name":"Namek/graphql2elm","owner":"Namek","description":":computer: Generate Elm code based on GraphQL query and schema","archived":false,"fork":false,"pushed_at":"2018-10-18T16:43:49.000Z","size":337,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T06:48:22.677Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://namek.github.io/graphql2elm/","language":"Kotlin","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/Namek.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,"zenodo":null}},"created_at":"2018-02-20T17:55:54.000Z","updated_at":"2020-08-24T13:18:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"201535ff-678f-4c87-b265-54e6467810c0","html_url":"https://github.com/Namek/graphql2elm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Namek/graphql2elm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fgraphql2elm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fgraphql2elm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fgraphql2elm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fgraphql2elm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Namek","download_url":"https://codeload.github.com/Namek/graphql2elm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Namek%2Fgraphql2elm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266561336,"owners_count":23948627,"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-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":"2025-02-25T06:48:24.048Z","updated_at":"2025-10-29T17:14:49.313Z","avatar_url":"https://github.com/Namek.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GraphQL to Elm\nGenerate [Elm](http://elm-lang.org) code based on [GraphQL](http://graphql.org/) query and schema. Generated code uses [jamesmacaulay/elm-graphql](https://github.com/jamesmacaulay/elm-graphql) library.\n\nSee [online web generator](https://namek.github.io/graphql2elm/). Also see [Examples](https://github.com/Namek/graphql2elm/wiki/Examples).\n\n# Status\n\nFeature list consists of:\n\n- generate record aliases (`type alias`) and enums which are used in given query\n- return type of whole query is being shortened to the first field that consists of more than one subfields\n- config: known types - so it won't generate new ones but import the existing ones\n- config: map backend types to front-end types - like `Boolean` -\u003e `Bool` between [Elixir](https://elixir-lang.org/) and Elm\n- config: decoders for known types\n- config: support nullable fields by using [Maybe](http://package.elm-lang.org/packages/elm-lang/core/latest/Maybe)\n\nThis stuff is available on [web generator](https://github.com/Namek/graphql2elm/tree/master/graphql2elm-js).\n\nI have no plans for further development since I found another tool with a more interesting approach. It generates code for a whole GraphQL API + generates a decent API for writing queries. It's https://github.com/dillonkearns/elm-graphql - check it out.\n\n## Roadmap (deprecated)\n\n- field arguments (basics done)\n- input variables (basics done)\n- fragments (?)\n- extend configuration of [online web generator](https://namek.github.io/graphql2elm/) for known types\n\n# Dev experience\n\n- Whole parsing + generation logic is implemented with [Kotlin](https://kotlinlang.org/). Because it's nice. And it transpiles to JavaScript.\n- Parsing of GraphQL queries is done with custom parser. Previously, I started with ANTLR but decided to try and write parser by hand instead of generating it and I'm actually pretty satisfied with it.\n- Schema is a JSON which comes from a result of GraphQL introspection query (`__schema`). There's also a parser for it (well, it should be called Interpreter because it's just a JSON).\n- The [web generator](https://github.com/Namek/graphql2elm/tree/master/graphql2elm-js) is done with Elm 0.19 bootstrapped by code written in Kotlin, later transpiled to JS.\n\n\n## Build\n\nBuild web generator by calling `gradle assembleWeb` from the root directory. You'll find the result in `build/web`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamek%2Fgraphql2elm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnamek%2Fgraphql2elm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnamek%2Fgraphql2elm/lists"}