79634596

Date: 2025-05-22 22:16:25
Score: 1.5
Natty:
Report link
  1. Don't request each book separately (multiple entities of same kind).

    So if you need to retrieve 10, 30, 1000 or 10,000 books - do it in one request.

    *. 10,000 probably could involve paging.

  2. Suppose you had to retrieve Books, Authors and Publishers.

    You can do 3 separate (parallel) requests: Books, Authors, Publishers - because each kind has its own endpoint.

  3. But eventually, I needed to get all kind of mixes of entities, so I added also a generic endpoint - to retrieve entities by list of EntityId {string Kind, int Id}.

    So I requested all the needed entities in one request: Books + Authors + Publishers.

Reasons:
  • Blacklisted phrase (0.5): I need
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Daniel Gordon