迁移到GraphQL:实际评估
Migrating to GraphQL: A Practical Assessment
摘要:
GraphQL是Facebook提出的一种新型查询语言,用于实现基于Web的API。在本文中,我们提出了一个实际的研究迁移API客户端到这个新技术。首先,我们进行了灰色文献综述,以深入了解从业者通常与GraphQL相关的好处和关键特征。之后,我们在实践中评估了这些好处,通过迁移七个系统使用GraphQL,而不是标准的基于REST的API。作为我们的关键结果,我们表明GraphQL可以将REST API返回的JSON文档的大小减少94%(字段数)和99%(字节数),这两个结果都是中位数。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。