api-database-edgedb
Gel (formerly EdgeDB) Patterns
Quick Guide: Gel (formerly EdgeDB) is a graph-relational database built on PostgreSQL. Define schemas in
.gelfiles using SDL with types, links, and computed properties. Usegel migration create+gel migratefor schema changes. Query with EdgeQL (set-based, deeply nested shapes) or the TypeScript query builder (e.select,e.insert). Everything in EdgeQL is a set -- empty sets need explicit casts, and operations on sets produce Cartesian products. Useglobalvariables with access policies for row-level security. The query builder requires a running database for code generation (npx @gel/generate edgeql-js).Naming: EdgeDB was rebranded to Gel in February 2025. The
edgedbnpm package, CLI, and.esdlextension still work via compatibility shims, but new projects should usegel,@gel/generate, and.gelfiles.
<critical_requirements>
CRITICAL: Before Using This Skill
All code must follow project conventions in CLAUDE.md (kebab-case, named exports, import ordering,
import type, named constants)
(You MUST run npx @gel/generate edgeql-js after every gel migrate -- the generated query builder is based on the database schema and becomes stale after migrations)
(You MUST cast empty sets explicitly (<str>{}, <int64>{}) -- bare {} is a syntax error because EdgeQL is strongly typed and cannot infer the type of an empty set)
(You MUST understand that all EdgeQL values are sets -- operations on multi-valued expressions produce Cartesian products, not element-wise results)
More from agents-inc/skills
web-animation-css-animations
CSS Animation patterns - transitions, keyframes, scroll-driven animations, @property, GPU-accelerated properties, accessibility with prefers-reduced-motion
24web-animation-view-transitions
View Transitions API patterns - same-document transitions, cross-document MPA transitions, shared element animations, pseudo-element styling, accessibility
21web-testing-playwright-e2e
Playwright E2E testing patterns - test structure, Page Object Model, locator strategies, assertions, network mocking, visual regression, parallel execution, fixtures, and configuration
21web-styling-cva
Class Variance Authority - type-safe component variant styling with cva(), compound variants, and VariantProps
20web-animation-framer-motion
Motion (formerly Framer Motion) animation patterns - motion components, variants, gestures, layout animations, scroll-linked animations, accessibility
20web-i18n-next-intl
Type-safe i18n for Next.js App Router
19