But as you start to re-use REST APIs across multiple pages/apps, you often end up:
- over-fetching: you'll receive some data that you don't actually need, but that it's required by another page
- over-querying: the data you are over-fetching might have required extra queries (or even worse calls to an external system)
- cascading requests: if you are working with nested data you might have to call the server multiple times, often in a sequential manner
Also in my experience the performance of REST APIs tends to get worse over time, because as many developers work over the same APIs it's almost unavoidable to keep these APIs lean. Just before Christmas we had to spend some time figuring out why a fairly simple GraphQL request was taking almost 2 seconds. Turns out a developer had accidentally introduced an n+1 in the underlying REST API. The n+1 was on a field/relationship that we didn't need/use, but with REST you don't usually get to pick what you want to load so...
Solving these problems with REST is possible but not trivial, while GraphQL mostly solves them out of the box. So while REST could be faster than GraphQL, in my experience it usually ends up being slower.