explaingit

geldata/gel

14,088PythonAudience · developerComplexity · 4/5LicenseSetup · moderate

TLDR

Gel is a graph-relational database built on PostgreSQL that lets you define data as object types with links instead of tables and foreign keys, and query it with EdgeQL instead of SQL.

Mindmap

mindmap
  root((gel))
    What it does
      Graph-relational DB
      Built on PostgreSQL
      EdgeQL query language
    Data Modeling
      Object types
      Properties
      Links between types
    Features
      CLI tool
      Migrations system
      Client libraries
    Deployment
      Self-hosted
      Managed cloud
    Audience
      App developers
      Backend engineers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Build a new web app backend with graph-relational data modeling instead of writing JOIN-heavy SQL.

USE CASE 2

Migrate an existing application away from a traditional ORM by defining object types and links that mirror your domain model.

USE CASE 3

Prototype a schema with nested relationships and query it without writing raw SQL.

USE CASE 4

Use the managed cloud hosting to run a production Gel database without self-hosting infrastructure.

Tech stack

PythonPostgreSQLEdgeQL

Getting it running

Difficulty · moderate Time to first run · 30min

Requires installing the Gel CLI and initializing a project, a local database instance is created automatically.

Use freely for any purpose including commercial, Apache 2.0 requires keeping the copyright notice and not misusing the project's trademarks.

In plain English

Gel is a database that builds on top of PostgreSQL while changing how you model and query your data. The project calls itself a graph-relational database, meaning it blends ideas from relational databases like PostgreSQL, graph databases, and ORM libraries (tools that translate between app code and database rows) into one system. Instead of defining tables and foreign keys, you define object types with properties and links. A Movie type might have a title property and an actors link that points to Person objects. This maps more naturally to how most programming languages already think about data, and avoids the back-and-forth translation work that traditional SQL schemas require. To query Gel, you use a language called EdgeQL, which the project designed as a ground-up alternative to SQL. EdgeQL returns structured objects rather than flat rows, so fetching a movie and all of its related actors is one clean query with no JOIN statements. Queries can also be nested: you can insert a movie and link it to existing Person records in a single operation. Gel ships with a command-line tool, a migrations system for updating schemas over time, and client libraries for multiple programming languages. A managed cloud hosting option is available if you do not want to run the database yourself. To get a local instance running, the README shows three terminal commands: one to install the CLI, one to initialize a project, and one to open an interactive shell. The code is released under the Apache 2.0 license.

Copy-paste prompts

Prompt 1
I'm using Gel and want to define a Movie type with a title, release year, and a multi-link to Person actors. Show me the schema definition and an EdgeQL query to insert a movie linked to existing actors.
Prompt 2
Convert this SQL schema with users and orders tables related many-to-many via order_items into a Gel schema using object types and links.
Prompt 3
Write an EdgeQL query that fetches all movies released after 2020 along with their actors names and the number of movies each actor appears in.
Prompt 4
Show me how to set up a new Gel project from scratch using the CLI, run the first migration, and open an interactive EdgeQL shell.
Prompt 5
I'm coming from Prisma. How do I define computed fields and backlinks in Gel's schema language compared to Prisma's model syntax?
Open on GitHub → Explain another repo

← geldata on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.