Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add live query support to the imperative operation runners
#239 added support for live queries to the react hooks. React provides a great model for ... react-ing... to changes in the live query where the hooks can trigger a re-render. #239 did not add support for the imperative style of api calls to go live because it isn't immediately clear how they should work. This adds the inner support we need for calling imperative live queries. I chose to use async iterators for this api. The end result would look like: ``` for await (const result of api.widget.findOne("123")) { console.log(result); } ``` `result` there would be a fully formed `GadgetRecord` instance, and each time it changed on the backend, we'd push a whole new instance out the async iterator. [no-changelog-required]
- Loading branch information