GraphQL to Gremlin Transpiler for Multi-Database Query Translation

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing graph database systems require dedicated platforms and query languages, making it difficult to perform analysis independently of the underlying database and necessitating user knowledge of specific query languages, particularly when accessing multiple graph databases.

Innovation Solution

A system and method for converting GraphQL queries into Gremlin queries, utilizing a schema creator, UI component, and Gremlin transpiler to parse and map user inputs, allowing for the creation of database-agnostic queries that can be executed across multiple Gremlin-supported graph databases without requiring knowledge of the query language.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If dedicated query languages are used for each graph database, then database-specific functionality is optimized, but user complexity and learning requirements increase

Engineering Contradiction:
Improvedatabase-specific functionalityVSAvoiduser complexity
Core Design Contradiction:
ReliabilityVSEase of operation

Solution Approach 1:

The patent introduces GraphQL as an intermediary query language that sits between the user and the Gremlin query language. The system translates GraphQL queries into Gremlin, allowing users to work with a unified, user-friendly interface while the underlying database-specific operations are handled automatically through the translation layer.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Reliability

If multiple graph databases are accessed with different query languages, then database-specific optimizations are achieved, but system complexity and development time increase

Engineering Contradiction:
Improvedatabase optimizationVSAvoidsystem complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent implements a universal GraphQL interface that can access multiple different graph databases (such as JanusGraph, TinkerPop, and others) through a single unified query language. The system automatically translates the universal GraphQL queries into database-specific Gremlin queries, allowing one system to serve multiple database backends without requiring separate query languages for each.

Inventive Principle:
Principle #6Universality (Multi-functionality)

3Measurement precision

If database-specific query languages are required, then precise data access is achieved, but productivity and analysis speed decrease

Engineering Contradiction:
Improvedata access precisionVSAvoidanalysis speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The system performs preliminary translation of GraphQL queries into Gremlin queries before executing them against the database. This pre-compilation step converts the user-friendly GraphQL syntax into optimized database-specific syntax in advance, maintaining precise data access while eliminating the need for users to manually write and debug complex database-specific queries, thereby improving productivity.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS12019630B2Method and system for converting graphql query into gremlin
Publication Date: 2024.06.25 INFOSYS LTD
  • US12019630B2 patent drawing
  • US12019630B2 patent drawing
  • US12019630B2 patent drawing

AI summary

Provided is a method and system for converting graphql query into gremlin comprising microservices based architecture, that may convert a query input in a graph query language (graphql) or natural language into gremlin queries that may get executed in any graph database required by a user. Hence a user may not need to have any knowledge of the query language. In one example of the present technology, multiple gremlin supporting backend graph databases with a uniform interface may be supported, along with more than one instance of backend database in the same instance.