These are chat archives for Automattic/mongoose

16th
Apr 2019
Ryan Truran
@RyanTruran
Apr 16 17:24
what is the best way to return 3 different queries(1 find, 2 aggregates) into 1 response?
Richard Bateman
@taxilian
Apr 16 18:46
That really depends on what you want to do with those. Generally speaking I would execute them (possibly in parallel) and then write them out to a page or whatever... but since that seems pretty basic I have to wonder if I'm missing something in your question
Ryan Truran
@RyanTruran
Apr 16 19:02
i was really just curious if there was a down side to executing 3 GET request that return 3 different responses, versus 1 GET request that returns the results of all 3 queries in 1 response.