Hey everyone! I open-sourced some code I’ve been writing over the last several months in support of the app I’m building at work: reason-react-apollo!
It’s bindings + codegen for working with Apollo’s react-hooks library, and it takes an alternative approach to typing your GraphQL stuff than graphql_ppx. Specifically, it uses abstract types for each of your schema types that can be shared around your project instead of a specific type for each operation you define. I’ve never liked that tradeoff that graphql_ppx required, so I gradually developed an alternative approach! And, with Apollo’s release of the hooks API, everything came together really nicely.
If you’re interested in trying it out the docs site explains how to get started (it’s using GraphQL Code Generator for the codegen, so the setup mostly involves getting that configured). I’ve love to hear any feedback about how it works with your schema, the docs, or really anything! I’ve really enjoyed the experience of writing components that use queries/mutations this way and hope others will benefit, too!