Encapsulating queries
If I have several API calls that need to be manipulated and correlated with other API calls before the data is used in my component: is it acceptable/idiomatic to run a query against a promise that encapsulates all of those API calls, or is it preferred to handle each async function within the larger function separately?
1 Reply
yappiest-sapphire•3y ago
I'd say it depends, if that's the only time you'll ever need those pieces of data, then maybe it would be okay. If you ever need to use a partial bit of those API calls then it would make more sense to break them out so RQ can share the cache.