Graph Management

ADD GRAPH <name> ON CONNECTOR <connector>
    [GRAPH <remote_name>]
    [MAPPING <mapping_name>]
    [READ ONLY];

CREATE GRAPH <name>
    [{ <gql_schema_body> } | ANY]
    ON CONNECTOR <connector>;

UNADD GRAPH [IF EXISTS] <name>;
DROP GRAPH [IF EXISTS] <name>;

ALTER GRAPH <name> SET READ ONLY;
ALTER GRAPH <name> SET READ WRITE;
ALTER GRAPH <name> SET CONNECTOR <connector>;
ALTER GRAPH <name> SET GRAPH <remote_name>;
ALTER GRAPH <name> SET MAPPING <mapping_name>;
ALTER GRAPH <name> REMOVE MAPPING;

Query Syntax

-- Single graph
USE <graph> <query>;

-- Focused multi-graph
USE <graph1> <simpleQuery>
USE <graph2> <simpleQuery>
RETURN ...;

-- Composite
USE <graph1> <query>
UNION | UNION ALL | INTERSECT | INTERSECT ALL | EXCEPT | EXCEPT ALL
USE <graph2> <query>;

Configuration Reference

MemGQL is configured entirely via environment variables.

General

VariableDefaultDescription
CONNECTOR_TYPEmemgraphConnector to use (see table below)
CONNECTION_TYPE(none)Alias for CONNECTOR_TYPE
BOLT_LISTEN_ADDR127.0.0.1:7688Address the Bolt server binds to

Enterprise License

VariableDefaultDescription
MEMGQL_ENTERPRISE_LICENSE(none)License key (mglk-...)
MEMGQL_ORGANIZATION_NAME(none)Organization name to verify against license

When set, the license is decoded and verified against the organization name at startup. A valid enterprise license removes connector and connection limits. Without a license, community mode allows up to 4 connectors and 4 simultaneous connections.

Connector Types

ConnectorTranslationBackend
memgraphNone (passthrough)Memgraph
memgraph-gqlGQL -> CypherMemgraph
neo4jNone (passthrough)Neo4j
neo4j-gqlGQL -> CypherNeo4j
postgresGQL -> SQLPostgreSQL
mysqlGQL -> SQLMySQL 8.0+
duckdbGQL -> SQLDuckDB (embedded)
clickhouseGQL -> SQLClickHouse
icebergGQL -> SQLIceberg via Trino
pinotGQL -> SQLApache Pinot
multiPer-connectorMultiple backends simultaneously

Memgraph (memgraph, memgraph-gql)

VariableDefaultDescription
MEMGRAPH_URI127.0.0.1:7687Connection URI
MEMGRAPH_USERuserUsername
MEMGRAPH_PASSpassPassword
MEMGRAPH_DBmemgraphDatabase name

Neo4j (neo4j, neo4j-gql)

VariableDefaultDescription
NEO4J_URI127.0.0.1:7687Connection URI
NEO4J_USERneo4jUsername
NEO4J_PASSpasswordPassword
NEO4J_DBneo4jDatabase name

PostgreSQL (postgres)

VariableDefaultDescription
POSTGRES_URLhost=localhost user=postgres password=postgres dbname=postgreslibpq connection string
MAPPING_FILE(none, uses built-in default)Path to JSON mapping file

MySQL (mysql)

VariableDefaultDescription
MYSQL_URLmysql://root:mysql@localhost:3306/testMySQL connection URL (mysql://user:pass@host:port/database)
MAPPING_FILE(none, uses built-in default)Path to JSON mapping file

DuckDB (duckdb)

VariableDefaultDescription
DUCKDB_PATH:memory:Path to DuckDB file
MAPPING_FILE(none, uses built-in default)Path to JSON mapping file

ClickHouse (clickhouse)

VariableDefaultDescription
CLICKHOUSE_URLhttp://localhost:8123ClickHouse HTTP API URL
CLICKHOUSE_USERdefaultClickHouse user
CLICKHOUSE_PASS(none)ClickHouse password
CLICKHOUSE_DBdefaultClickHouse database
MAPPING_FILE(none, uses built-in default)Path to JSON mapping file

Apache Pinot (pinot)

VariableDefaultDescription
PINOT_URLhttp://localhost:8099Pinot broker base URL or full SQL endpoint
PINOT_QUERY_OPTIONSuseMultistageEngine=trueQuery options sent with broker SQL requests
MAPPING_FILE(none, uses built-in default)Path to JSON mapping file

Iceberg (iceberg)

VariableDefaultDescription
TRINO_URLhttp://localhost:8080Trino REST API URL
TRINO_USERtrinoTrino user
TRINO_CATALOGicebergTrino catalog
TRINO_SCHEMAdefaultTrino schema
MAPPING_FILE(none, uses built-in default)Path to JSON mapping file