Complete full-stack web app with a mu-haskell GraphQL server and an Elm client! ๐ณ
This Elm example aims to demonstrate how to implement both frontend and backend in a schema-first, typesafe, and functional way.
To run this example, you need to run the GraphQL server example (with Stack):
$ cd backend && stack run library
And, in another terminal, this project:
$ cd frontend && npm install && npm run codegen codegen && npm start
SelectionSet
sschema.graphql
as the single source of truth, using it to generate type level representations of the schema that we can use to implement our server!You'll need a few things: stack, npm (and optionally, Nix).
Run nix-shell
the first time you clone the project, that way you'll have the generated .pre-commit-config.yaml
git hook! ๐
When using Visual Studio Code, please prefer opening a pre-configured workspace file mu-graphql-example-elm.code-workspace
.