Skip to content
This repository has been archived by the owner. It is now read-only.
GraphQL for Elm
Branch: master
Clone or download
Latest commit de3fe37 Oct 19, 2016
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
src
test
typings
.gitignore
.npmignore
LICENSE JSON encoding and decoding Mar 2, 2016
README.md Update README.md Oct 17, 2016
package.json
tsconfig.json

README.md

elm-graphql

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.

Install

npm install -g elm-graphql

Usage

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

Example

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

You can’t perform that action at this time.