Now that our Rescript client and server have the same data model, we can hook up the graphql endpoints to sync the offline rxdb database with the graphql server.
Continuing my ongoing series on the Rescript programming language, I discovered I needed to refactor my backend to better suit the graphql queries the frontend has to make to it.
Now that our RxDB models are complete, we can hook it up to a react app for a complete offline experience.
Extending the JS bindings I’ve modelled in previous articles, in this add bindings for subscribing to queries, and hook those up to Application state.
In an earlier article, I started modelling RxDB calls from rescript with the intent of building an offline-enabled Rescript app. This article continues from that base, modelling collections and queries.