reason-react-apollo icon indicating copy to clipboard operation
reason-react-apollo copied to clipboard

Project Namespace in Docs incorrect

Open idkjs opened this issue 6 years ago • 1 comments

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.

idkjs avatar Oct 16 '19 17:10 idkjs

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...

kgoggin avatar Oct 21 '19 05:10 kgoggin