we have an API that returns us products, but it can not include the brands in the same response.
entity-space should then collect the brandIds and issue a new query against the Brand API, then assign the result to the products.
feature has to work recursively; so if the Brand model now also has reviews:
and the Brand API can't include the reviews in the same response, we make yet another API call to fetch the reviews and assign them to the brands to finally get this:
What
ability to hydrate relations of entities that have not been provided by an API call by using another, subsequent API call.
Why
so the manual work of making multiple API calls and aggregating the data does not have to be done by the user.
Example
using those two models:
we have an API that returns us products, but it can not include the brands in the same response. entity-space should then collect the brandIds and issue a new query against the Brand API, then assign the result to the products.
feature has to work recursively; so if the Brand model now also has reviews:
and the Brand API can't include the reviews in the same response, we make yet another API call to fetch the reviews and assign them to the brands to finally get this: