GQL Reference
ArcFlow implements ISO/IEC 39075 GQL as WorldCypher — its native query dialect. Conformance is measured against the openCypher TCK (~56% strict canonical today, hardening in progress — see below). WorldCypher adds extensions for temporal snapshots, live queries, confidence scoring, and graph algorithms that GQL leaves to implementations.
Standards conformance:
| Standard | Status |
|---|---|
| openCypher TCK | 🔧 ~56% strict canonical — 2192/3881 (release 2024.3, measured 2026-06-29; hardening under I-INIT-GQLC) |
| ISO GQL V2 (ISO/IEC 39075) | ✅ Substantial — GQLSTATUS codes, IS LABELED, ELEMENT_ID, NEXT WHEN/THEN/ELSE/END, constraints, transaction control |
For a narrative overview of GQL lineage, how WorldCypher relates to Cypher and ISO GQL, and a comparison with other implementations, see the GQL Conformance page.
Complete reference of supported features, syntax, and current implementation status follows.
Query Clauses#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| CREATE node | ✅ | CREATE (n:Label {props}) | |
| CREATE relationship | ✅ | CREATE (a)-[:REL]->(b) | Inline with nodes |
| MATCH | ✅ | MATCH (n:Label {props}) | |
| Multi-MATCH | ✅ | MATCH (a) MATCH (b) RETURN a, b | CartesianProduct |
| OPTIONAL MATCH | ✅ | MATCH (a) OPTIONAL MATCH (a)-[:R]->(b) | |
| MERGE node | ✅ | MERGE (n:Label {props}) | ON CREATE/ON MATCH SET |
| MERGE relationship | ⚠️ | MERGE (a)-[:R]->(b) | Creates if not found; find-or-create may create duplicates |
| DELETE | ✅ | MATCH (n) DELETE n | |
| DETACH DELETE | ✅ | MATCH (n) DETACH DELETE n | Cascade deletes relationships |
| SET property | ✅ | SET n.key = value | One property per SET clause |
| SET multiple | ⚠️ | SET n.a = 1, n.b = 2 | Use separate SET clauses: SET n.a = 1 SET n.b = 2 |
| REMOVE | ✅ | REMOVE n.key | Remove a property |
| WITH | ✅ | WITH n WHERE ... RETURN | Projection + CTE forms |
| UNWIND | ✅ | UNWIND [1,2,3] AS x | Literal lists only |
| WHERE | ✅ | WHERE n.age > 30 | |
| WHERE OR labels | ✅ | WHERE (n:Person OR n:Company) | |
| RETURN | ✅ | RETURN n.name, count(*) | |
| ORDER BY | ✅ | ORDER BY n.age DESC | |
| LIMIT | ✅ | LIMIT 10 |
Expressions & Predicates#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| CONTAINS | ✅ | WHERE n.name CONTAINS 'ali' | |
| STARTS WITH | ✅ | WHERE n.name STARTS WITH 'A' | |
| toLower | ✅ | RETURN toLower(n.name) | String transformation |
| COALESCE | ✅ | RETURN COALESCE(n.x, 0) | Null coalescing with default |
| labels() | ✅ | RETURN labels(n) | |
| Variable-length paths | ✅ | MATCH (a)-[:KNOWS*1..3]->(b) |
Aggregation Functions#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| count(*) | ✅ | RETURN count(*) | |
| sum | ✅ | RETURN sum(n.x) | |
| avg | ✅ | RETURN avg(n.age) | |
| min / max | ✅ | RETURN min(n.x), max(n.x) | |
| collect | ✅ | RETURN collect(n.name) |
Window Functions#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| LAG | ✅ | lag(n.close, 1) OVER (PARTITION BY n.symbol ORDER BY n.date) | Previous row value |
| LEAD | ✅ | lead(n.close, 21) OVER (PARTITION BY n.symbol ORDER BY n.date) | Future row value |
| AVG OVER | ✅ | avg(n.close) OVER (... ROWS BETWEEN 199 PRECEDING AND CURRENT ROW) | Rolling average |
| STDDEV_POP OVER | ✅ | stddev_pop(n.close) OVER (...) | Rolling standard deviation |
| SUM OVER | ✅ | sum(n.volume) OVER (PARTITION BY n.symbol ORDER BY n.date) | Expanding sum |
| PERCENT_RANK | ✅ | percent_rank() OVER (PARTITION BY n.date ORDER BY n.close) | Cross-sectional ranking |
| ROW_NUMBER | ✅ | row_number() OVER (PARTITION BY n.date ORDER BY n.close DESC) | Row numbering |
| SKEWNESS OVER | ✅ | skewness(n.close) OVER (...) | Rolling skewness |
| MAX OVER | ✅ | max(n.close) OVER (...) | Rolling maximum |
Live Views (Incremental Computation)#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| CREATE LIVE VIEW | ✅ | CREATE LIVE VIEW name AS MATCH ... RETURN ... | Maintained via CDC |
| Read from view | ✅ | MATCH (row) FROM VIEW name RETURN row | Zero-cost read |
| List views | ✅ | CALL db.liveViews |
Temporal#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| AS OF | ✅ | MATCH (n) AS OF seq N | Temporal snapshot query |
Indexes#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| CREATE VECTOR INDEX | ✅ | CREATE VECTOR INDEX name FOR (n:Label) ON (n.prop) OPTIONS {dimensions: N, similarity: 'cosine'} | vector similarity search |
| CREATE FULLTEXT INDEX | ✅ | CREATE FULLTEXT INDEX name FOR (n:Label) ON (n.prop) | BM25 scoring |
Parameterized Queries#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| Parameter binding | ✅ | $param in queries | Substituted before compilation, prevents injection |
Algorithms (CALL algo.*)#
Run directly — no projection lifecycle needed.
| Procedure | Description |
|---|---|
algo.pageRank() | PageRank centrality (20 iterations, damping 0.85) |
algo.confidencePageRank() | Confidence-weighted PageRank |
algo.betweenness() | Betweenness centrality |
algo.closeness() | Closeness centrality |
algo.degreeCentrality() | Degree centrality |
algo.louvain() | Louvain community detection |
algo.leiden() | Leiden community detection |
algo.communityDetection() | Community detection |
algo.connectedComponents() | Connected components |
algo.clusteringCoefficient() | Local clustering coefficient |
algo.nodeSimilarity() | Node similarity |
algo.triangleCount() | Triangle count |
algo.kCore() | K-core decomposition |
algo.density() | Graph density |
algo.diameter() | Graph diameter |
algo.allPairsShortestPath() | All-pairs shortest paths |
algo.nearestNodes() | Find nearest nodes |
algo.vectorSearch(index, vector, k) | vector similarity search |
algo.similarNodes() | Find similar nodes |
algo.hybridSearch() | Hybrid vector + graph search |
algo.graphRAG() | Trusted GraphRAG pipeline |
algo.graphRAGContext() | GraphRAG context generation |
algo.graphRAGTrusted() | GraphRAG with trust scoring |
algo.compoundingScore | Compounding score calculation |
algo.contradictions() | Find contradictions in data |
algo.audienceProjection(weights) | Audience projection analytics |
algo.factsByRegime(args) | Facts by time regime |
algo.confidencePath() | Confidence-weighted shortest path |
algo.multiModalFusion() | Multi-modal data fusion |
Database Procedures (CALL db.*)#
| Procedure | Description |
|---|---|
db.stats | Node, relationship, and index counts |
db.schema | Label→property mappings + relationship patterns |
db.labels | All node labels |
db.types | All relationship types |
db.propertyKeys | All property keys |
db.indexes | Index information |
db.nodeCount | Total node count |
db.relationshipCount | Total relationship count |
db.version | Engine version |
db.capabilities | GPU, incremental, live-delta support |
db.doctor | 5 health checks |
db.fingerprint | Graph hash for integrity verification |
db.export | Full graph as JSON snapshot |
db.import | Restore from JSON snapshot |
db.import.csv | Import from CSV |
db.clear | Reset graph to empty |
db.demo | Load sample social network |
db.help | Complete procedure guide |
db.procedures | List all available procedures |
db.tutorial | Interactive 6-step walkthrough |
db.index.fulltext.queryNodes(index, query) | Full-text BM25 search |
db.validateQuery(cypher) | Query validation |
db.checkpointMeta | Checkpoint metadata (generation, node count) |
Temporal Procedures (CALL temporal.*)#
| Procedure | Description |
|---|---|
temporal.decay(halfLife, floor) | Exponential decay |
temporal.trajectory() | Entity trajectory over time |
temporal.velocity(days) | Rate of change |
Live Queries#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| LIVE MATCH | ✅ | LIVE MATCH (n:Person) RETURN n | Standing query |
| LIVE CALL | ✅ | LIVE CALL algo.pageRank() | Incremental algorithm |
| CREATE LIVE VIEW | ✅ | CREATE LIVE VIEW name AS ... | Persistent live view |
Session & Multi-tenancy#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| USE PARTITION | ✅ | USE PARTITION 'workspace-42' | Tenant isolation |
| SET SESSION | ✅ | SET SESSION ACTOR 'user-1' ROLE 'admin' | Session context |
Skills#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| CREATE SKILL | ✅ | CREATE SKILL name FROM PROMPT ... | Declarative AI skill |
| PROCESS NODE | ✅ | PROCESS NODE (n:Label) | Execute skill on node |
Triggers#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| CREATE TRIGGER | 🔜 | CREATE TRIGGER name ON :Label WHEN CREATED RUN SKILL skill_name | Fire-once event binding |
| DROP TRIGGER | 🔜 | DROP TRIGGER name | Remove trigger registration |
| WHEN CREATED | 🔜 | ON :Label WHEN CREATED | Fires on node creation |
| WHEN MODIFIED | 🔜 | ON :Label WHEN MODIFIED | Fires on property change |
| WHEN DELETED | 🔜 | ON :Label WHEN DELETED | Fires on node deletion |
| Procedure | Description |
|---|---|
db.triggers() | List all registered triggers with label, event, and skill |
Programs#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| CREATE PROGRAM | 🔜 | CREATE PROGRAM name VERSION '...' (...) | Install a capability manifest |
| DROP PROGRAM | 🔜 | DROP PROGRAM name | Deregister program and its triggers |
| CARDINALITY SINGLETON | 🔜 | CARDINALITY SINGLETON | One executor instance globally |
| CARDINALITY PER_SENSOR | 🔜 | CARDINALITY PER_SENSOR | One executor per :Sensor node |
| CARDINALITY SHARDED | 🔜 | CARDINALITY SHARDED BY <prop> | One executor per unique property value |
| REQUIRES GPU | 🔜 | REQUIRES GPU (SM >= 7.0, VRAM >= 4.0) | Hardware validation at install time |
| EVIDENCE tier | 🔜 | EVIDENCE SYMBOLIC | WASM | LLM | NEURAL | Epistemic class for program outputs |
| Procedure | Description |
|---|---|
arcflow.programs.list() | List all installed programs with provides tags and cardinality |
arcflow.programs.describe(name) | Full manifest: I/O schema, hardware requirements, executor |
arcflow.programs.validate(name) | Check hardware requirements without installing |
arcflow.programs.health(name) | Executor health: status, last heartbeat, address |
arcflow.programs.remove(name) | Remove a program and deregister its triggers |
arcflow.programs.find_by_capability(tag) | Find programs providing a given capability tag |
Server Protocols#
| Feature | Status | Syntax | Notes |
|---|---|---|---|
| HTTP API | ✅ | arcflow --http 8080 | REST query endpoint |
| PostgreSQL Wire | ✅ | arcflow --pg 5432 | Connect with psql, DBeaver, Grafana |
| MCP Server | ✅ | arcflow-mcp | Cloud chat interface integration (ChatGPT, Claude.ai, Gemini web) |
Observation & Evidence#
| Procedure | Description |
|---|---|
db.observationClasses() | Observation classification (observed, inferred, predicted) |
db.nodesByObservation.observed() | Nodes with observed labels |
db.nodesByObservation.inferred() | Nodes with inferred labels |
db.nodesByObservation.predicted() | Nodes with predicted labels |
db.proofArtifacts | Cryptographic proof artifacts |
db.proofGates | Proof gate information |
db.provenance | Data provenance |
Live Query System#
| Procedure | Description |
|---|---|
db.liveViews | List active live views |
db.liveAlgorithms | Active running algorithms |
db.liveQueries | Active standing queries |
db.liveSkills | Active live skills |
db.subscriptions | Active subscriptions |
db.topics | Message topics |
db.mutations | Active mutations |
GPU Acceleration#
| Procedure | Description |
|---|---|
db.gpuStack | GPU stack information |
algo.pageRankCSR | PageRank — GPU-accelerated path |
algo.bfsCSR | BFS — GPU-accelerated path |
algo.triangleCountCSR | Triangle count — GPU-accelerated path |
Behavior Graph#
| Procedure | Description |
|---|---|
behavior.tick | Execute behavior tick |
behavior.status | Behavior system status |
behavior.nodes | Behavior node information |
Swarm / Multi-Agent#
| Procedure | Description |
|---|---|
swarm.agents | List active swarm agents |
swarm.register | Register new agent |
swarm.agentCount | Count active agents |
See Also#
- GQL Conformance — ISO/IEC 39075 standards compliance and TCK results
- Graph Algorithms — full algorithm catalog
- Programs —
CREATE PROGRAMcapability manifests with hardware validation and executor wiring - Triggers —
CREATE TRIGGERfire-once event bindings - Known Issues — active workarounds and edge cases
Try it
Open ↗⌘↵ to run
Loading engine…