I've wondered for some time now why most API endpoints even need to exist. The very concept of "glue code" seems to me like a code smell; if you aren't doing any interesting logic, why do you need an extra layer of code there at all? The only answers I've ever been given are authentication and sanitization, both of which seem solvable.
I'm very confused. There are a lot of problem where you are doing nothing but integrating two services. You run a canned query but things like field names are different or one service uses GraphQL and the other uses CSV files on some network share. You are just converting between two things. Why is the extra layer of code there? Because it's very simple and less work. You just write 5 lines of queries and 10 lines doing field mapping. The alternative might be to use something like Apache Camel. It might be the right tool for the job but now everyone involved has to be an Apache Camel expert even though your team donesn't care about Apache Camel and that is a perfectly acceptable position. Instead making dogmatic decisions like avoiding "wasteful glue code" because of your ideology you just write the code and be done with the problem. The end result is the same but you get to write code in the tech stack your company has been using for years instead of trying to chase some stupid enterprise architecture fad.
Why focus on the easy problems? Why not solve the hard ones?
No, it is kind of what I'm saying. More hamfisted than I'd like, maybe, but along the right lines.
My point is that an extra layer of in-house code is an extra layer to build and maintain, even if it doesn't do anything meaningful. Ideally it could be eliminated altogether, but automatically generating it still relieves most of the development overhead.