anmonteiro / anmonteiro/reason-graphql-fullstack

Suggestions + Questions

オープン
#4 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
OCaml
スター
245
フォーク
18
PR マージ指標
30日以内にマージされた PR はありません

説明

Thank you for your example!

### Suggestions
- It would be nice if you add some explanation about the steps you took to set up this project and why.
- I'm new to Reason would appreciate some comment about the choices you've made and what other alternatives you've considered.

### Questions
I was trying to set up a full stack Reason app. When I looked at your example everything happens in the first commit and it's difficult for me to see the steps. I was wondering if this is roughly what you did to set up this project?

1. initialize a ReasonReact app
`bsb -init my-react-app -theme react`
2. ignore the JS files created in the build process
add `*.bs.js` to .gitignore file
3. create `client` and `shared` sub-directory
update the entry point of Webpack
add the subdirs to the bsconfig file
4. add reason-apollo
Follow the install instructions in https://github.com/apollographql/reason-apollo
- `yarn add reason-apollo`
- `yarn add --dev graphql_ppx`
- `yarn add react-apollo apollo-client apollo-cache-inmemory apollo-link apollo-link-context apollo-link-error apollo-link-http graphql graphql-tag`
- Add reason-apollo to your bs-dependencies and graphql_ppx/ppx to your ppx_flags
5. create a opam package
- opam add demo . -n
- updates the build command to use jbuilder
https://jbuilder.readthedocs.io/en/latest/usage.html#invocation-from-opam
- add jbuilder, lwt, graphql, graphql-lwt as dependencies
6. add dune config
`dune-project`, `server/jbuild`, `shared/jbuild`

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。