Migrating to GraphQL: A Practical Assessment
This addresses the efficiency of web-based APIs for developers, but it is incremental as it applies an existing method to new data.
The paper tackled the problem of migrating API clients to GraphQL by assessing its practical benefits, showing that GraphQL reduces JSON document size by 94% in fields and 99% in bytes compared to REST APIs.
GraphQL is a novel query language proposed by Facebook to implement Web-based APIs. In this paper, we present a practical study on migrating API clients to this new technology. First, we conduct a grey literature review to gain an in-depth understanding on the benefits and key characteristics normally associated to GraphQL by practitioners. After that, we assess such benefits in practice, by migrating seven systems to use GraphQL, instead of standard REST-based APIs. As our key result, we show that GraphQL can reduce the size of the JSON documents returned by REST APIs in 94% (in number of fields) and in 99% (in number of bytes), both median results.