DZone

Origins in a Facebook Case Study 

In order to better understand the “REST vs. GraphQL” debate, it is useful to look at where GraphQL originates. GraphQL began when Facebook observed that the HTTP-based API powering their UIs was too chatty and did not allow more specific requests in efforts to avoid overfetching. This prompted Facebook to return to the drawing board and modify its internal API.

One overhaul option for their internal API, which connects Facebook apps on the phone and in the browser to their back-end, would have been to change the design of the REST API (resource-oriented HTTP-based API). They could have created more coarse-grained resources with additional filtering capabilities. However, Facebook chose an entirely different API style and created the query-style GraphQL language as an alternative. 

Source: DZone

By dret