3 ms·
This stuff: Relay coalesces queries into batches for efficiency, manages error-prone asynchronous logic, caches data for performance, and automatically updates
by zkhalique 11y ago
This stuff:
Relay coalesces queries into batches for efficiency, manages error-prone asynchronous logic, caches data for performance, and automatically updates views as data changes.
Relay is also component-oriented, extending the notion of a React component to include a description of what data is necessary to render it. This colocation allows developers to reason locally about their application and eliminates bugs such under- or over-fetching data.
We do the same thing (we call it the getter and batcher pattern). See http://platform.qbix.com/guide/patterns http://platform.qbix.com/guide/patterns
Briefly, the way it works is that you request a certain object, and don't have to worry about batching, throttling, caching, etc. You can also say "please call this function when all the following objects are fetched".
Our platform is also heavily based around events for which handlers are automatically unregistered when pages and tools are removed. So it's same as with facebook.
Plus we already support most of the following:
Offline support. This will allow applications to fulfill queries and enqueue updates without connectivity.
Real-time updates. In collaboration with the GraphQL community, we're working to define a specification for subscriptions and provide support for them in Relay.
A generic Relay. Just as the power of React was never about the virtual DOM, Relay is much more than a GraphQL client. We're working to extend Relay to provide a unified interface for interacting not only with server data, but also in-memory and native device data (and, even better, a mix of all three).
Finally, it's all too easy as developers to focus on those people with the newest devices and fastest internet connections. We're working to make it easier to build applications that are robust in the face of slow or intermittent connectivity.
See http://platform.qbix.com/guide/messages http://platform.qbix.com/guide/messages