当前位置: X-MOL 学术Int. J. Softw. Eng. Knowl. Eng. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Exploiting Declarative Mapping Rules for Generating GraphQL Servers with Morph-GraphQL
International Journal of Software Engineering and Knowledge Engineering ( IF 0.9 ) Pub Date : 2020-07-17 , DOI: 10.1142/s0218194020400070
David Chaves-Fraga 1 , Freddy Priyatna 1 , Ahmad Alobaid 1 , Oscar Corcho 1
Affiliation  

In the last decade, REST has become the most common approach to provide web services, yet it was not originally designed to handle typical modern applications (e.g. mobile apps). GraphQL was proposed to reduce the number of queries and data exchanged in comparison with REST. Since its release in 2015, it has gained momentum as an alternative approach to REST. However, generating and maintaining GraphQL resolvers is not a simple task. First, a domain expert has to analyze a dataset, design the corresponding GraphQL schema and map the dataset to the schema. Then, a software engineer (e.g. GraphQL developer) implements the corresponding GraphQL resolvers in a specific programming language. In this paper, we present an approach to exploit the information from mappings rules (relation between target and source schema) and generate a GraphQL server. These mapping rules construct a virtual knowledge graph which is accessed by the generated GraphQL resolvers. These resolvers translate the input GraphQL queries into the queries supported by the underlying dataset. Domain experts or software developers may benefit from our approach: a domain expert does not need to involve software developers to implement the resolvers, and software developers can generate the initial version of the resolvers to be implemented. We implemented our approach in the Morph-GraphQL framework and evaluated it using the LinGBM benchmark.

中文翻译:

利用声明式映射规则生成带有 Morph-GraphQL 的 GraphQL 服务器

在过去十年中,REST 已成为提供 Web 服务的最常见方法,但它最初并不是为处理典型的现代应用程序(例如移动应用程序)而设计的。与 REST 相比,提出 GraphQL 是为了减少查询和交换数据的数量。自 2015 年发布以来,它已成为 REST 的替代方法。但是,生成和维护 GraphQL 解析器并不是一项简单的任务。首先,领域专家必须分析数据集,设计相应的 GraphQL 模式并将数据集映射到模式。然后,软件工程师(例如 GraphQL 开发人员)以特定的编程语言实现相应的 GraphQL 解析器。在本文中,我们提出了一种利用映射规则(目标和源模式之间的关系)中的信息并生成 GraphQL 服务器的方法。这些映射规则构建了一个虚拟知识图,生成的 GraphQL 解析器可以访问该知识图。这些解析器将输入的 GraphQL 查询转换为底层数据集支持的查询。领域专家或软件开发人员可能会从我们的方法中受益:领域专家不需要软件开发人员来实现解析器,软件开发人员可以生成要实现的解析器的初始版本。我们在 Morph-GraphQL 框架中实现了我们的方法,并使用 LinGBM 基准对其进行了评估。领域专家不需要软件开发人员来实现解析器,软件开发人员可以生成要实现的解析器的初始版本。我们在 Morph-GraphQL 框架中实现了我们的方法,并使用 LinGBM 基准对其进行了评估。领域专家不需要软件开发人员来实现解析器,软件开发人员可以生成要实现的解析器的初始版本。我们在 Morph-GraphQL 框架中实现了我们的方法,并使用 LinGBM 基准对其进行了评估。
更新日期:2020-07-17
down
wechat
bug