论文标题

链接生成器,用于增加OpenAPI到GraphQL翻译的实用性

A Link Generator for Increasing the Utility of OpenAPI-to-GraphQL Translations

论文作者

Kus, Dominik Adam, Koren, István, Klamma, Ralf

论文摘要

标准化的接口是当今分布式系统的连接链接,促进云中对数据服务的访问。在过去几年中,REST API一直很普遍,尽管资源过度和取消资源等问题。 GraphQL享有快速采用,通过使用静态键入查询来解决这些问题。但是,对新范式的服务重建是昂贵的。因此,已经提出了几种连续迁移到GraphQL的方法,许多利用OpenAPI服务描述。在本文中,我们介绍了我们对API的经验评估的发现,并确定了几个模式翻译挑战。其中包括GraphQL中不太表现力的模式类型,以及缺少有关OpenAPI相关资源的元信息。为此,我们开发了开源链接生成器,该生成器分析OpenAPI文档并自动添加链接以增加翻译实用程序。从根本上讲,这受益于API.Guru目录中的34%的API。我们的发现和工具支持有助于对REST API迁移到GraphQL的迁移,并为开发人员提供对常见陷阱的宝贵见解,以减少API转换过程中的摩擦。

Standardized interfaces are the connecting link of today's distributed systems, facilitating access to data services in the cloud. REST APIs have been prevalent over the last years, despite several issues like over- and underfetching of resources. GraphQL enjoys rapid adoption, resolving these problems by using statically typed queries. However, the redevelopment of services to the new paradigm is costly. Therefore, several approaches for the successive migration from REST to GraphQL have been proposed, many leveraging OpenAPI service descriptions. In this article, we present the findings of our empirical evaluation on the APIs.guru directory and identify several schema translation challenges. These include less expressive schema types in GraphQL, as well as missing meta information about related resources in OpenAPI. To this end, we developed the open source Link Generator, that analyzes OpenAPI documents and automatically adds links to increase translation utility. This fundamentally benefits around 34% of APIs in the APIs.guru directory. Our findings and tool support contribute to the ongoing discussion about the migration of REST APIs to GraphQL, and provide developers with valuable insights into common pitfalls, to reduce friction during API transformation.

扫码加入交流群

加入微信交流群

微信交流群二维码

扫码加入学术交流群,获取更多资源