API versioning or dynamic endpoints?
Hello everyone,
weare slowly moving from supabase and database stored procedures from postgres
to a fully manged backend with nestjs and everything was going great at a good pace and the only client was the mobile.
and suddenly the web came up and got a freelancer to build the web UI and boom she added more data to fill up extra spaces.
for example
GET /teams
returns id, name, logo and isAdmin
now the new web UI requires two more information
membersCount, upcomingSession.
then we went on a full two hours "discussion" on what to do to solve this problem
either make /v2/teams that returns the new fields and when the mobile migrates to it, it will be *Over Fetching*
either add some configuration in the service with couple of if statements to return the extras /teams?platform=web or something similar which will cause service layer complexity.
what to do in this delimma ?