arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2604.27223cs.DB
收藏

Graphify:通过O(S) GraphQL到Gremlin的转换生成类型安全的图后端

Graphify: Automated Synthesis of Type-Safe Graph Backends via $O(S)$ GraphQL-to-Gremlin Transpilation

Northwestern University(西北大学)

Johannes Graf

AI总结:

Graphify通过O(S)复杂度的转换生成类型安全的图后端,支持完整的CRUD操作和嵌套查询,提升图数据库的灵活性和安全性。

摘要:

图数据库在管理互联数据方面具有无与伦比的灵活性,但缺乏严格的模式约束常导致运行时不确定性和复杂的查询开发。本文介绍了Graphify,一个端到端框架,使开发人员能够可视化建模图数据模式并自动合成一个完全功能且类型安全的后端。该论文提出了一种将GraphQL artifacts映射到Gremlin遍历机器的正式方法,支持完整的CRUD操作和任意嵌套查询。系统生成一个转换器,能够将复杂的GraphQL请求转换为一个优化的Gremlin查询,包括嵌套逻辑谓词、多键排序和分页等高级功能。框架的核心是一种递归状态机算法,以线性时间复杂度O(S)处理GraphQL抽象语法树(AST)。本文通过形式复杂度分析和使用MovieLens 100k数据集的实证评估,展示了该方法的实用效率和理论稳健性。结果是一个能够在几分钟内生成图接口的系统,弥合了灵活图存储和类型安全API消费之间的差距。

英文摘要:

Graph databases offer unparalleled flexibility for managing interconnected data, yet the lack of strict schema enforcement often leads to runtime uncertainties and complex query development. This paper introduces Graphify, an end-to-end framework that enables developers to visually model graph data schemas and automatically synthesize a fully functional, type-safe backend. This paper proposes a formal mapping of GraphQL artifacts to the Gremlin traversal machine, supporting complete CRUD operations and arbitrarily nested queries. The system generates a transpiler capable of converting complex GraphQL requests into a single, optimized Gremlin query, including advanced features such as nested logical predicates, multi-key sorting, and pagination. At the core of the framework is a recursive state machine algorithm that processes GraphQL Abstract Syntax Trees (ASTs) with linear time complexity $O(S)$ relative to the number of selected fields. This paper demonstrates the practical efficiency and theoretical robustness of the approach through formal complexity analysis and empirical evaluation using the MovieLens 100k dataset. The result is a system that enables the generation of graph interfaces in minutes, bridging the gap between flexible graph storage and type-safe API consumption.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑