Skip to main content

Hugr Apps

Hugr Apps are pluggable applications that connect to the hugr engine via DuckDB Airport extension (Arrow Flight gRPC) and publish their API into the shared GraphQL schema.

What Can a Hugr App Do?

  • Expose scalar functions — add custom computations callable from GraphQL
  • Expose tables and table functions — serve data from any source as queryable tables
  • Use hugr-managed databases — declare PostgreSQL data sources with automatic schema init and migrations
  • Organize with modules — group functions and tables into nested GraphQL modules
  • Hot-reload on update — deploy new versions without downtime; hugr detects changes automatically

Architecture

Hugr Apps Architecture

The app registers with hugr on startup. Hugr attaches the app via DuckDB Airport extension, reads the catalog (functions, tables) through _mount schema, and compiles them into the GraphQL schema. If the app declares data sources, hugr provisions the databases (connects to PostgreSQL, runs init/migrate SQL provided by the app) and mounts them as sub-modules.

Sections

GuideDescription
Getting StartedCreate your first hugr app in 10 minutes
Application InterfacesApplication, DataSourceUser, DBInitializer, Shutdown
CatalogMux APIRegister functions, tables, table functions with CatalogMux
Data SourcesDeclare PostgreSQL databases, schema init, migrations
Schema DesignDefault schema, named schemas, modules, naming conventions
Lifecycle & MonitoringHeartbeat, crash recovery, graceful shutdown, rolling updates
ConfigurationEnvironment variables, AppInfo fields, reserved names