This is an alternative site for discovering Elm packages. You may be looking for the official Elm package site instead.
elm-grapql
version 1.2.0
license BSD2
native-modules False
elm-version 0.18.0 <= v < 0.19.0
Tag 1.0.0
Committed At 2017-06-13 19:29:20 UTC
elm-lang/http 1.0.0 <= v < 2.0.0 1.0.0
elm-lang/core 5.0.0 <= v < 6.0.0 5.1.1

Modules

    README

    ⚠ This is a work in progress!


    elm-graphql

    elm-graphql aims to generate Elm code for making GraphQL queries in a type-safe manner. It's being developed at the bimonthly Elm Hackathon. Contributions are welcome.

    This prototype consists of a code generator which 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.

    The type of each query is a single large record. We do not generate type aliases for each "object", because GraphQL allows different fields to be selected for the same type at different nesting levels within the same query. Elm's extensible records mean that there's really no reason to want to do this anyway.

    We use Facebook's graphql-js to parse a GraphQL schema.

    Build

    cd tool
    npm install
    

    This builds the code generator, but you'll need to check out my demo project to actually use it, see below.

    Demo

    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