What strategy would you use to handle complex API output?
I need to output a lot of different data in 1 API call, in order to save overhead, how would you do this?
I have thought about different strategies:
- Make one big repository that handles everything (probably not a very maintanable way of doing it, but is an option no matter what)
- Split the API into many different endpoints targeted one purpose each, however I don't want more requests than necessary, so these must be combined either in the repository or maybe I should make some form of entry-endpoint and the ability to add on what other endpoints should be merged into the output?
Would you consider something of the second approach?