Elm code generator for GraphQL


1.1.524 years ago5 years agoMinified + gzip package size for @blissfully/elm-graphql in KB



elm-graphql generates Elm code for making GraphQL queries in a type-safe manner.

At compile time, elm-graphql takes GraphQL schema and named queries in a .graphql file and generates corresponding Elm types. The schema is obtained by introspection of a live GraphQL server.

elm-graphql is simply for making queries, it is not a framework like Relay but it could be the foundation other abstractions in the future.


npm install -g elm-graphql


Configure the GraphQL endpoint URL. This will be saved in elm-package.json:

elm graphql --init URL

Now you can generate an Elm module for each .graphql file:

elm graphql


Check out my elm-graphql-demo which provides a sample application and includes full build instructions.

How it works

See the wiki page, how elm-graphql works for more details.

Projects using elm-graphql

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.