Consider a RESTful API that returns the following in it's typical response
- List of results
- Pagination information
- Navigators (i.e. Categories, Sub-Categories, Locations, etc.)
- Graphing data
In the View, every time a navigator is changed, the results, graphs, and navigators must be updated.
I would like to have a single fetch() that will update all of these collections.
I have been able to do this already, but it is not clean and I am looking for a best-practice to handle this, since I would expect this to be a common scenario. Yet, I have not been able to find much on this.
I will note that I am using Backgrid JS (if that is relevant for the answer).
Maybe I am not searching for the right terms, but I would appreciate any help with this.
Thanks!