anmonteiro / reason-graphql-fullstack

Fullstack Reason + GraphQL Todo List App
MIT License
245 stars 19 forks source link

Suggestions + Questions #4

Open alireza-a opened 6 years ago

alireza-a commented 6 years ago

Thank you for your example!

Suggestions

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
  6. add dune config dune-project, server/jbuild, shared/jbuild