TypeGraph
Type-safe graphs on Postgres/SQLite (no graph DB required)
Details
- External ID
- 47137908
- Source
- HN
- Company
- —
- Product
- TypeGraph
- Website domain
- typegraph.dev
- Launched
- Feb. 24, 2026
- Cohort
- —
- Upvotes
- 5
- Upvotes percentile
- 0.10512129380053908
- Tags
- —
- Fetched at
- Sept. 7, 2026, 9:25 p.m.
- Updated at
- Sept. 7, 2026, 9:25 p.m.
Description
Hi HN, I built TypeGraph, a type-safe knowledge graph library that runs on your existing Postgres or SQLite.After years of building knowledge graphs and other graphy things, I had the same issues whenever an application’s relationship modeling (permissions, RAG context, recommendations) outgrew standard ORMs: deploy a dedicated graph database (heavy ops, separate infra, data syncing headaches), or roll a graph-in-SQL implementation by hand.I've hand-rolled enough of these to know the drill: same table structures, same traversal boilerplate, same performance surprises. I wanted graph semantics without graph infrastructure so I built TypeGraph as that pattern packaged as a library. It runs on anything from in-memory SQLite to a full Postgres cluster, using Zod for a single source of truth (driving your DB schema, API validation, and TS types).You query it with a fluent builder that's fully typed through traversals: const results = await store .query() .from("Person", "p") .traverse("worksAt", "e") .to("Company", "c") .whereNode("c", (c) => c.industry.eq("Tech")) .select((ctx) => ({ person: ctx.p.name, company: ctx.c.name, role: ctx.e.role, })) .execute(); Eject at any time and you're left with clean, well-structured SQL tables and nothing proprietary to untangle.A few things that set it apart from rolling your own:* Ontology reasoning: subClassOf, implies, inverseOf — query for "Media" and automatically get Podcasts and Articles. Define "Admin implies Editor" and permission checks expand automatically.* Vector + graph queries: combine embedding similarity search with graph traversal in one query. Uses pgvector on Postgres, sqlite-vec on SQLite.* Incremental adoption: builds on Drizzle. Add graph capabilities to an existing project without replacing your ORM or migrating your database.Where it works well: knowledge graphs for RAG (vector similarity + graph context), relationship-based access control, recommendations, social features, any domain where multi-hop relationships are core.Where it doesn't: billions of edges (use a graph database), heavy graph algorithms like PageRank (use specialized tools), distributed graph processing.Docs: https://typegraph.devGitHub: https://github.com/nicia-ai/typegraph/Happy to answer questions about the design, implementation, or tradeoffs.
Enrichment
- Theme
- database infrastructure and developer tools
- Vertical
- —
- Function
- Data infrastructure
- Audience
- Developer
- AI stance
- Not AI
- Project type
- Commercial product
- Normalized one-liner
- type-safe graphs on postgres and sqlite
- Manually corrected
- False
Could you build this?
Partial Building basic CRUD helpers on Postgres or SQLite is straightforward, but implementing a robust bitemporal graph engine with recursive CTE traversals and type inference is mathematically complex.
What it would actually take: A production version requires an ontology engine using Zod mapped dynamically to optimized relational schemas, compiling high-level graph traversals into performant recursive SQL CTEs. It must handle bitemporal state tracking (valid time vs. transaction time), index tuning across graph edges, and complex compile-time TypeScript type acrobatics.
Discussion
No comments on this launch.
Competitors
Other products that read as similar to this one — 176 launches clear the similarity bar, closest 8 shown.
Attention rank: #160 of 177 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 118 days after the earliest competitor.
- BlitzGraph · hn · 2026-06-16 · 15 upvotes · similarity 0.60
- SQLite Graph Ext · hn · 2025-10-29 · 35 upvotes · similarity 0.55
- Ontology-driven knowledge graph extraction from text · hn · 2025-11-24 · 13 upvotes · similarity 0.53
- LatticeDB · hn · 2026-08-25 · 190 upvotes · similarity 0.53
- Typol · hn · 2026-06-07 · 5 upvotes · similarity 0.50
- TuringDB · hn · 2026-01-28 · 7 upvotes · similarity 0.49
- Pg-typesafe · hn · 2026-02-17 · 69 upvotes · similarity 0.48
- jevgraph · github · 2026-09-20 · 19 upvotes · similarity 0.48
Other launches for this product
- No other launches for this product.