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:

StandardStatus
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#

FeatureStatusSyntaxNotes
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, bCartesianProduct
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 nCascade deletes relationships
SET property✅SET n.key = valueOne property per SET clause
SET multiple⚠️SET n.a = 1, n.b = 2Use separate SET clauses: SET n.a = 1 SET n.b = 2
REMOVE✅REMOVE n.keyRemove a property
WITH✅WITH n WHERE ... RETURNProjection + CTE forms
UNWIND✅UNWIND [1,2,3] AS xLiteral 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#

FeatureStatusSyntaxNotes
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#

FeatureStatusSyntaxNotes
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#

FeatureStatusSyntaxNotes
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)#

FeatureStatusSyntaxNotes
CREATE LIVE VIEW✅CREATE LIVE VIEW name AS MATCH ... RETURN ...Maintained via CDC
Read from view✅MATCH (row) FROM VIEW name RETURN rowZero-cost read
List views✅CALL db.liveViews

Temporal#

FeatureStatusSyntaxNotes
AS OF✅MATCH (n) AS OF seq NTemporal snapshot query

Indexes#

FeatureStatusSyntaxNotes
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#

FeatureStatusSyntaxNotes
Parameter binding✅$param in queriesSubstituted before compilation, prevents injection

Algorithms (CALL algo.*)#

Run directly — no projection lifecycle needed.

ProcedureDescription
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.compoundingScoreCompounding 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.*)#

ProcedureDescription
db.statsNode, relationship, and index counts
db.schemaLabel→property mappings + relationship patterns
db.labelsAll node labels
db.typesAll relationship types
db.propertyKeysAll property keys
db.indexesIndex information
db.nodeCountTotal node count
db.relationshipCountTotal relationship count
db.versionEngine version
db.capabilitiesGPU, incremental, live-delta support
db.doctor5 health checks
db.fingerprintGraph hash for integrity verification
db.exportFull graph as JSON snapshot
db.importRestore from JSON snapshot
db.import.csvImport from CSV
db.clearReset graph to empty
db.demoLoad sample social network
db.helpComplete procedure guide
db.proceduresList all available procedures
db.tutorialInteractive 6-step walkthrough
db.index.fulltext.queryNodes(index, query)Full-text BM25 search
db.validateQuery(cypher)Query validation
db.checkpointMetaCheckpoint metadata (generation, node count)

Temporal Procedures (CALL temporal.*)#

ProcedureDescription
temporal.decay(halfLife, floor)Exponential decay
temporal.trajectory()Entity trajectory over time
temporal.velocity(days)Rate of change

Live Queries#

FeatureStatusSyntaxNotes
LIVE MATCH✅LIVE MATCH (n:Person) RETURN nStanding query
LIVE CALL✅LIVE CALL algo.pageRank()Incremental algorithm
CREATE LIVE VIEW✅CREATE LIVE VIEW name AS ...Persistent live view

Session & Multi-tenancy#

FeatureStatusSyntaxNotes
USE PARTITION✅USE PARTITION 'workspace-42'Tenant isolation
SET SESSION✅SET SESSION ACTOR 'user-1' ROLE 'admin'Session context

Skills#

FeatureStatusSyntaxNotes
CREATE SKILL✅CREATE SKILL name FROM PROMPT ...Declarative AI skill
PROCESS NODE✅PROCESS NODE (n:Label)Execute skill on node

Triggers#

FeatureStatusSyntaxNotes
CREATE TRIGGER🔜CREATE TRIGGER name ON :Label WHEN CREATED RUN SKILL skill_nameFire-once event binding
DROP TRIGGER🔜DROP TRIGGER nameRemove trigger registration
WHEN CREATED🔜ON :Label WHEN CREATEDFires on node creation
WHEN MODIFIED🔜ON :Label WHEN MODIFIEDFires on property change
WHEN DELETED🔜ON :Label WHEN DELETEDFires on node deletion
ProcedureDescription
db.triggers()List all registered triggers with label, event, and skill

Programs#

FeatureStatusSyntaxNotes
CREATE PROGRAM🔜CREATE PROGRAM name VERSION '...' (...)Install a capability manifest
DROP PROGRAM🔜DROP PROGRAM nameDeregister program and its triggers
CARDINALITY SINGLETON🔜CARDINALITY SINGLETONOne executor instance globally
CARDINALITY PER_SENSOR🔜CARDINALITY PER_SENSOROne 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 | NEURALEpistemic class for program outputs
ProcedureDescription
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#

FeatureStatusSyntaxNotes
HTTP API✅arcflow --http 8080REST query endpoint
PostgreSQL Wire✅arcflow --pg 5432Connect with psql, DBeaver, Grafana
MCP Server✅arcflow-mcpCloud chat interface integration (ChatGPT, Claude.ai, Gemini web)

Observation & Evidence#

ProcedureDescription
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.proofArtifactsCryptographic proof artifacts
db.proofGatesProof gate information
db.provenanceData provenance

Live Query System#

ProcedureDescription
db.liveViewsList active live views
db.liveAlgorithmsActive running algorithms
db.liveQueriesActive standing queries
db.liveSkillsActive live skills
db.subscriptionsActive subscriptions
db.topicsMessage topics
db.mutationsActive mutations

GPU Acceleration#

ProcedureDescription
db.gpuStackGPU stack information
algo.pageRankCSRPageRank — GPU-accelerated path
algo.bfsCSRBFS — GPU-accelerated path
algo.triangleCountCSRTriangle count — GPU-accelerated path

Behavior Graph#

ProcedureDescription
behavior.tickExecute behavior tick
behavior.statusBehavior system status
behavior.nodesBehavior node information

Swarm / Multi-Agent#

ProcedureDescription
swarm.agentsList active swarm agents
swarm.registerRegister new agent
swarm.agentCountCount active agents

See Also#

  • GQL Conformance — ISO/IEC 39075 standards compliance and TCK results
  • Graph Algorithms — full algorithm catalog
  • Programs — CREATE PROGRAM capability manifests with hardware validation and executor wiring
  • Triggers — CREATE TRIGGER fire-once event bindings
  • Known Issues — active workarounds and edge cases
Try it
Open ↗
Loading engine…