kgoggin / reason-react-apollo

Reason Bindings For Apollo's React API
https://reason-react-apollo.kylegoggin.com
MIT License
24 stars 1 forks source link

Project Namespace in Docs incorrect #5

Open idkjs opened 5 years ago

idkjs commented 5 years ago

In docs you access this project with Apollo.

With current set up in stalled from npm, you would have to alias ReasonReactApollo.Project for it work.

module Apollo = ReasonReactApollo.Project;
let client = Apollo.createClient(~uri="http://http://localhost:50002", ());

[@react.component]
let make = () => {
  <Apollo.Provider client> <Component1 message="Hello! Click this text." /></Apollo.Provider>;
};

Looks promising. Happy to help work out the kinks in docs or whatever if you need the help. Keep up the good work, brother.

kgoggin commented 5 years ago

Thanks for the catch! I think I'd originally planned to include those bindings inside the functor that gets included when you run the codegen. I think that still feels like a better solution, so that all of your Apollo stuff ends up in the same module? Or I could also move those to their own module so they're not lumped in with the codegen stuff. Let me think on it a bit...