notes icon indicating copy to clipboard operation
notes copied to clipboard

Data Engine: Use cases

Open varl opened this issue 5 years ago • 0 comments

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 API POST/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're POSTs (and Content-Type: text/plain) to support long payloads in the request body.
  • [ ] Async validation with ui-forms

varl avatar Sep 13 '19 05:09 varl