Graph Query Language (GQL) is an International Organization for Standardization (ISO) standard, declarative query language specifically designed for creating, querying, and manipulating property graph data. It provides a unified, vendor-independent syntax for expressing complex graph patterns, enabling operations like pathfinding, subgraph matching, and graph transformation. As a successor and unifier influenced by languages like Cypher and SQL/PGQ, GQL aims to become the SQL for graph databases, offering a comprehensive suite of capabilities for CRUD operations, aggregation, and graph algorithms within a single, standardized language.
Glossary
Graph Query Language (GQL)

What is Graph Query Language (GQL)?
GQL is the International Organization for Standardization (ISO) standard query language for property graphs, designed for comprehensive graph pattern matching and manipulation.
The language's core strength lies in its pattern-matching paradigm, which allows developers to intuitively describe the shape of the subgraph they wish to find or construct using a visual, ASCII-art-like syntax. GQL is engineered for both online transactional processing (OLTP) and online analytical processing (OLAP) workloads, supporting ACID transactions, recursive queries, and integration with SQL for hybrid relational-graph analytics. Its standardization ensures portability across different graph database management systems (GDBMS), reducing vendor lock-in and establishing a foundational skill for developers working with interconnected data.
Key Features of GQL
Graph Query Language (GQL) is an International Organization for Standardization (ISO) standard query language for property graphs, designed to be a comprehensive language for graph pattern matching and manipulation. Its key features establish it as the definitive language for working with graph-structured data.
Declarative Pattern Matching
GQL is a declarative language, meaning users specify what data to find, not how to find it. The core operation is graph pattern matching, where you describe a subgraph structure of nodes and relationships. The query engine's optimizer determines the most efficient execution path.
- Example Pattern:
MATCH (p:Person)-[:WORKS_FOR]->(c:Company {name:'Inferensys'}) - This syntax allows intuitive expression of complex multi-hop traversals and variable-length paths.
Unified Data Manipulation Language (DML)
GQL provides a complete set of Data Manipulation Language operations within a single, cohesive syntax, going beyond simple querying.
- CREATE: Insert new nodes and relationships into the graph.
- MATCH / SET: Find existing elements and update their properties.
- DELETE / DETACH DELETE: Remove elements from the graph.
- MERGE: The "upsert" operation; ensures a pattern exists, creating it if missing.
This unification simplifies application code by eliminating the need to switch between different languages or APIs for basic CRUD operations.
Composability with SQL/PGQ
A foundational design principle of GQL is its composability with SQL. The ISO standard formally integrates GQL with SQL through Property Graph Queries (PGQ), a sublanguage within SQL. This allows:
- Graph Queries in SQL Context: PGQ enables graph pattern matching inside a standard SQL
FROMclause. - GQL Calling SQL: A GQL query can invoke a tabular SQL function to process data.
- Hybrid Workloads: Seamlessly join graph traversal results with traditional relational aggregations and reporting.
This bridges the worlds of relational and graph data, protecting existing SQL investments.
Comprehensive Data Definition Language (DDL)
GQL includes a full Data Definition Language for governing the structure and integrity of the property graph, moving beyond a simple query tool to a complete database language.
- CREATE / DROP GRAPH: Define named graph databases within a catalog.
- CREATE / ALTER / DROP TYPE: Define vertex types and edge types with mandatory labels and property schemas.
- Constraints: Enforce uniqueness constraints on properties and cardinality constraints on relationships.
- Index Management: Create and drop indexes on vertex/edge properties for query acceleration.
This allows administrators to fully define and evolve the graph schema.
Modularity & Path Queries
GQL supports advanced, modular query constructs essential for complex graph analytics.
- Graph Functions: Package reusable traversal logic into callable units.
- Path Queries: Explicitly return and manipulate paths (sequences of nodes and relationships) as first-class citizens in the result set.
- Path Patterns: Specify complex constraints on paths, including variable-length hops (e.g.,
[:KNOWS*1..5]) and negation (finding where a path does not exist). - Constructed Graphs: The
GRAPHclause allows queries to dynamically define a new, temporary graph view from matched patterns for further analysis.
These features enable sophisticated network analysis and recursive algorithms directly within queries.
Vendor-Neutral Standardization
As an ISO/IEC standard (ISO/IEC 39075), GQL's primary feature is its vendor neutrality and formal specification.
- Portability: Reduces vendor lock-in by providing a common language target for graph database implementations (e.g., Neo4j, TigerGraph, Amazon Neptune).
- Interoperability: Facilitates skills transfer and tooling development across the ecosystem.
- Rigorous Specification: The language semantics, syntax, and error conditions are formally defined, ensuring predictable behavior.
- Evolution: Managed by a consortium of industry and academic experts under ISO, ensuring the language evolves to meet long-term technical needs rather than being driven by a single vendor's roadmap.
This standardization is critical for enterprise adoption, providing a stable, future-proof foundation for graph technology investments.
How GQL Works: Syntax and Execution
An overview of the ISO-standard Graph Query Language's core syntax patterns and execution model for property graph databases.
Graph Query Language (GQL) is an International Organization for Standardization (ISO) standard declarative language for querying and manipulating property graphs. Its core syntax uses graph patterns expressed in an ASCII-art style to match subgraphs, where nodes are in parentheses () and directed edges are arrows --> or --. A query's MATCH clause defines the pattern to find, while RETURN specifies the data to output, and WHERE applies filters. The language supports comprehensive CRUD operations (Create, Read, Update, Delete) and complex path queries with variable-length traversals.
GQL execution is performed by a graph query engine that parses, optimizes, and executes the declarative statement. The engine performs pattern matching by traversing the graph's native storage structure, ideally leveraging index-free adjacency. For complex queries, the optimizer creates an execution plan that may utilize graph indexes on labels or properties to locate starting points efficiently. The language is designed for composability, allowing queries to be nested and combined with set operations, and it supports ACID transactions to ensure data integrity during updates.
GQL vs. Other Graph Query Languages
A technical comparison of the ISO-standard Graph Query Language (GQL) against other prominent graph query languages, focusing on standardization, data model support, and core capabilities for property graph manipulation.
| Feature / Capability | GQL (ISO/IEC 39075) | Cypher (Neo4j) | SPARQL (W3C) | PGQL (Oracle) |
|---|---|---|---|---|
Standardization Body | International Organization for Standardization (ISO) | OpenCypher / Linked Data Benchmark Council (LDBC) | World Wide Web Consortium (W3C) | Oracle Corporation |
Primary Data Model | Property Graph (ISO Standard) | Property Graph (Native) | RDF Triplestore | Property Graph |
Pattern Matching Syntax | Declarative, ASCII-art (MATCH) | Declarative, ASCII-art (MATCH) | Declarative, Triple Patterns (WHERE) | Declarative, SQL-like (GRAPH_TABLE) |
Schema Support | Integrated schema definition (CREATE GRAPH TYPE) | Optional via APOC or Neo4j 5.x | Implicit via RDFS/OWL ontologies | Integrated with SQL schema |
Path Query Constructs | Comprehensive (REPEAT, SHORTEST, ALL) | Comprehensive (variable-length, shortest path) | Limited (property paths via SPARQL 1.1) | Limited (reachability, fixed-length) |
Graph Modification (DML) | Full CRUD (CREATE, UPDATE, DELETE, MERGE) | Full CRUD (CREATE, SET, REMOVE, DELETE, MERGE) | Insert/Delete via SPARQL Update | Limited (primarily via SQL) |
Transaction Support | ACID transactions (specified) | ACID transactions (native) | Typically ACID (depends on triplestore) | ACID (inherited from underlying RDBMS) |
Built-in Graph Algorithms | Future extension planned | Via Graph Data Science library (GDS) | No (requires external extensions) | Via PGX in-memory analyst |
Composability / Subqueries | Full support (CALL subqueries) | Limited (CALL subqueries) | Subqueries (SELECT within WHERE) | Via SQL subqueries |
Integration with SQL | Designed for co-existence (SQL/PGQ) | No (separate query endpoint) | No (separate protocol) | Full integration (SQL:2023 PART 16) |
Database Support and Implementation
GQL is an ISO-standardized query language for property graphs, designed for comprehensive graph pattern matching and data manipulation. Its adoption is shaping database architecture and tooling.
ISO Standardization & Core Purpose
Graph Query Language (GQL) is an International Organization for Standardization (ISO) standard (ISO/IEC 39075) for querying and manipulating property graphs. Its primary purpose is to provide a unified, vendor-independent language for graph pattern matching, data modification, and schema definition. Developed alongside SQL/PGQ (Property Graph Queries), GQL is designed to be the principal language for property graphs, analogous to SQL's role for relational data. It aims to reduce vendor lock-in and establish a common foundation for graph database interoperability and tooling.
Core Language Constructs and Syntax
GQL's syntax is designed for intuitive expression of graph patterns. Key constructs include:
- MATCH Clauses: Specify patterns of nodes and relationships to find in the graph, using ASCII-art-like syntax (e.g.,
(a:Person)-[:WORKS_AT]->(b:Company)). - Path Patterns: Allow querying for variable-length connections and specific traversal depths.
- Graph Modification: Supports
CREATE,DELETE,SET, andREMOVEfor updating graph structure and properties. - Projection & Aggregation: Uses
RETURNandGROUP BYclauses to shape and aggregate result sets. - Subqueries & Composability: Enables complex, nested queries and result composition. Its design emphasizes declarative querying, letting users specify what data they want, not how to retrieve it.
Comparison with Cypher and SQL/PGQ
GQL's development was heavily influenced by existing languages, leading to important distinctions:
- GQL vs. Cypher: Cypher is the pioneering query language for Neo4j. GQL standardizes and extends many of Cypher's core concepts (like its
MATCHsyntax) but introduces a more formalized type system and comprehensive schema definition capabilities. GQL is intended as a formal standard, whereas Cypher is an implementation. - GQL vs. SQL/PGQ: SQL/PGQ (Part 16) is an extension to the SQL standard that allows graph queries (the
MATCHclause) to be embedded within SQL statements on relational tables. GQL is a standalone language for dedicated graph databases. A system can support both: SQL/PGQ for querying graphs in SQL databases, and GQL for native graph databases.
Database Vendor Support and Adoption
As a new standard, GQL implementation is actively progressing. Major database vendors are building support:
- Neo4j: The primary driver behind GQL's development. Neo4j is implementing GQL as a successor/enhancement to its Cypher language, with ongoing development in its core engine.
- TigerGraph: Has announced support for GQL, aligning its GSQL language with the standard.
- Amazon Neptune: Supports openCypher and SPARQL; GQL support is a logical future direction given its property graph capabilities.
- Microsoft Azure Cosmos DB: Its Gremlin API is a different paradigm (imperative traversal); GQL adoption would require significant engine work but is a potential long-term consideration for the industry. Adoption is a multi-year process, as it requires fundamental changes to query parsers, planners, and executors.
Schema Definition and Constraints
A significant advancement in GQL over many predecessor languages is its integrated schema definition language (SDL). This allows database administrators to formally define the graph's structure:
- Type Definitions: Create
NODE TYPEandEDGE TYPEdefinitions with specified property types. - Constraints: Apply uniqueness constraints on node properties and cardinality constraints on relationships (e.g.,
:OWNSedge fromCompanytoProductmust be exactly one). - Inheritance: Support for type hierarchies using
EXTENDS. This moves property graphs from a largely schema-less or schema-late (schema-on-read) model towards a more rigorous, integrity-enforcingschema-on-writeapproach, crucial for enterprise data governance.
Implementation Challenges and Query Optimization
Implementing a GQL engine involves several deep technical challenges:
- Query Planning & Cost Estimation: The planner must translate declarative graph patterns into an efficient sequence of low-level operations (seeks, traversals, joins). Estimating the cost of variable-length path traversals is particularly complex.
- Index Utilization: Efficiently leveraging graph indexes on labels and properties to avoid full graph scans. GQL's rich predicates require sophisticated index matching logic.
- Parallel Execution: Distributing query execution across a cluster for large graphs requires intelligent graph partitioning strategies to minimize cross-machine communication during traversals.
- Concurrency Control: Supporting ACID transactions with Multi-Version Concurrency Control (MVCC) for GQL's read and write operations, ensuring isolation and consistency for concurrent users.
Frequently Asked Questions
Graph Query Language (GQL) is the International Organization for Standardization (ISO) standard query language for property graphs, designed for comprehensive graph pattern matching and manipulation. These FAQs address its core purpose, mechanics, and relationship to other technologies.
Graph Query Language (GQL) is an International Organization for Standardization (ISO) standard, declarative query language specifically designed for creating, querying, updating, and managing data stored in property graph databases. It is the first dedicated, vendor-neutral standard for property graphs, analogous to SQL for relational databases, providing a comprehensive syntax for expressing complex graph pattern matching, filtering, and data manipulation operations. GQL unifies and extends concepts from existing languages like Cypher (from Neo4j) and PGQL, aiming to ensure portability and interoperability across different graph database systems that implement the standard.
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Related Terms
Graph Query Language (GQL) operates within a broader ecosystem of standards, languages, and data models for structured graph data. These related terms define the context, alternatives, and complementary technologies for graph querying and manipulation.
Property Graph Model
The property graph model is the underlying data structure that GQL is designed to query. It is defined by:
- Nodes (Vertices): Represent entities, which can have labels (types) and properties (key-value pairs).
- Relationships (Edges): Represent directed, typed connections between nodes. Relationships always have a start and end node and can also have properties.
- First-class relationships: Relationships are not just attributes of nodes but are explicit, navigable elements with their own identity. This model's flexibility and intuitiveness make it suitable for representing complex, interconnected domains like social networks, recommendation engines, and fraud detection systems.
RDF Triplestore
An RDF triplestore is a specialized database for storing and retrieving data formatted as RDF triples (subject-predicate-object). It is the primary storage backend for the semantic web and is queried using SPARQL. Key contrasts with property graph databases queried by GQL include:
- Data Model: Uses open-world, globally unique URIs and literals in triples, not nodes/edges with internal IDs.
- Schema: Often uses ontologies (OWL, RDFS) for rich semantics and inference.
- Query Paradigm: SPARQL queries match triple patterns against a global graph, while GQL navigates explicit adjacency paths. Triplestores excel in data integration and formal knowledge representation scenarios.
Graph Schema Language
A graph schema language is a formal syntax for defining the structure and constraints of a property graph. While GQL is for querying data, a schema language defines the data model. Functions include:
- Defining vertex and edge types (labels) and their permitted property keys and data types.
- Establishing constraints like uniqueness, cardinality, and mandatory properties.
- Documenting the intended structure of the graph for developers and data engineers. Examples include the native schema definitions in graph databases like Neo4j, TigerGraph's GSQL data definition language, and the proposed schema components within the GQL standard itself.

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us