Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/anmonteiro/reason-graphql-fullstack
Fullstack Reason + GraphQL Todo List App
https://github.com/anmonteiro/reason-graphql-fullstack
graphql native ocaml reason reason-react reasonml
Last synced: 4 days ago
JSON representation
Fullstack Reason + GraphQL Todo List App
- Host: GitHub
- URL: https://github.com/anmonteiro/reason-graphql-fullstack
- Owner: anmonteiro
- License: mit
- Created: 2018-06-03T22:58:34.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-24T18:17:35.000Z (almost 6 years ago)
- Last Synced: 2024-05-22T21:26:09.814Z (8 months ago)
- Topics: graphql, native, ocaml, reason, reason-react, reasonml
- Language: OCaml
- Size: 582 KB
- Stars: 246
- Watchers: 9
- Forks: 19
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-list - reason-graphql-fullstack
README
# Reason / GraphQL Shared Backend
This is an example of a fullstack Reason + GraphQL application that uses a native
backend and a client compiled to JavaScript through BuckleScript, whilst sharing
types between the backend and the frontend.## Technologies / Libraries:
This was initially based on [@jaredly](https://github.com/jaredly)'s
[isomagic-todos](https://github.com/jaredly/isomagic-todos) experiment that accomplished
sharing types between the backend & frontend through some PPX magic.In this case, we leverage the power of GraphQL and its support in OCaml through
[ocaml-graphql-server](https://github.com/andreas/ocaml-graphql-server) and
[graphql_ppx](https://github.com/mhallin/graphql_ppx) to build our API through shared
OCaml / Reason types (have a look in [`src/shared`](./src/shared)).## Running
### Build the front-end
- `yarn && yarn build && yarn bundle`
### Build and run the backend
**Note**: _it's a quiet startup; check http://localhost:8080/graphql to see that it's running!_
- `npm install -g esy`
- `esy @server`
- `esy @server x graphql`## Neat tricks
- GraphQL schema fully defined in Reason (see [`src/server/schema.re`](./src/server/schema.re))
- There's also a GraphiQL instance at `localhost:8080/graphql` for exploring and
playing with the queries and mutations.## License
MIT