backend – Custom Endpoint VS (REST or GraphQL)

There are many online posts talking about the comparison between REST and GraphQL.

The most common claim is that:

GraphQL can manage more flexible requests while REST will result in fetching more data than needed or in having to ask for multiple pieces of information.

I want to use a backend server for a private app and I am thinking about how to do it. I still have some of the old AJAX backend mindset and I would like to do it right (or at least what’s right at the current time) but I wonder about the following:

REST and GraphQL exist to serve the purpose of answering requests in a generic standard way. I can see it’s useful if you want to create a public API for the sake of standarization.

But is this still the best solution for a private project where you know exactly what kind of information you will need? I mean:

Would it not be more efficient to just create custom endpoints that you know you will need and where you will perfom very specific and optimized tasks?

For example:


This would be easier to develop and to understand.

Of course, if tomorrow I want to change some features, this would require to update the endpoint.

But apart from that, what else should I consider to go one way or the other?

If there is anything I can do to improve the quality of the question and avoid being downvoted for some mysterious reason please let me know.