Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jahewson/elm-graphql
GraphQL for Elm
https://github.com/jahewson/elm-graphql
elm graphql
Last synced: about 1 month ago
JSON representation
GraphQL for Elm
- Host: GitHub
- URL: https://github.com/jahewson/elm-graphql
- Owner: jahewson
- License: bsd-2-clause
- Archived: true
- Created: 2016-01-21T21:27:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2016-11-10T23:35:56.000Z (almost 8 years ago)
- Last Synced: 2024-09-25T22:43:32.686Z (about 2 months ago)
- Topics: elm, graphql
- Language: TypeScript
- Homepage:
- Size: 137 KB
- Stars: 312
- Watchers: 13
- Forks: 27
- Open Issues: 11
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# elm-graphql
`elm-graphql` generates [Elm](http://elm-lang.org) code for making [GraphQL](http://graphql.org) 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](https://facebook.github.io/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](https://github.com/jahewson/elm-graphql-demo) which provides a sample application and includes full build instructions.
## How it works
See the wiki page, [how elm-graphql works](https://github.com/jahewson/elm-graphql/wiki/How-elm-graphql-works) for more details.
## Projects using elm-graphql
- [elm-hipster-stack](https://github.com/carleryd/elm-hipster-stack): Elm, Phoenix, GraphQL and RethinkDB