notes
notes copied to clipboard
Data Engine: Use cases
Data Engine: Use Cases
➡️ Split off from #56
@amcgee in #56 wrote:
Basically, we need to collect all the possible use cases for the Data Engine so that we can create a well-designed API. Here are the ones I have so far: [...]
Are there more use cases I'm missing? Particularly interested in weird / unconventional API patterns people have seen.
List of use cases
Add new use cases to the list as they come up (tick them off as they are supported):
- [ ] Simple one-time query to fetch data (
DataQuery
, often on component mount) - [ ] Re-fetching of previously fetched data
- [ ] Retrying transient failures like timeouts (should probably happen automatically within the Engine without any consumer interaction)
- [ ] Handling loading states and permanently-failed requests (
404
errors) - [ ] Injecting authentication headers and intercepting authentication and permissions error responses
- [ ] Subscribing to a data stream, automatically polling or listening for changes and notifying the consumer when the data has changed
- [ ] Write and delete operations (
DataMutation
) which turn into APIPOST
/PATCH
/DELETE
requests (again the HTTP layer is hidden from the consumer) - [ ] Expression validation - this might be a special case or incorporated into the
DataQuery
implementation, but expression API requests are different than normal API requests in that they'rePOST
s (andContent-Type: text/plain
) to support long payloads in the request body. - [ ] Async validation with
ui-forms