TypeScript · REST · SQL-friendly
Shape your API, not your codebase.
MeshQL adds GraphQL-style field selection to REST. Clients ask for exactly what they need. You write one SQL query, return flat rows, and MeshQL shapes nested JSON.
# npm
npm install @meshqljs/core @meshqljs/http @meshqljs/client
# JSR
npx jsr add @meshql/core @meshql/http @meshql/client
The idea
GraphQL pain
40 resolvers, N+1 debugging, and codegen eating your types.
REST pain
Every client wants a different ?include= and you ship half the database.
MeshQL middle ground
Normal REST URLs. Query in headers. One resolver per entity. SQL you already write.
Packages
Published on JSR (@meshql/*) and npm (@meshqljs/*). Porting MeshQL? See the protocol specs.
@meshql/core
@meshqljs/core
Parser, join planner, response shaper, and createMesh(). Custom plugins use MeshPlugin from core.
@meshql/postgres
@meshqljs/postgres
buildSelectSql for Postgres ($1, $2, … placeholders).
@meshql/sqlite
@meshqljs/sqlite
buildSelectSql for Node's built-in node:sqlite, Bun, and D1.
@meshql/prisma
@meshqljs/prisma
Prisma catch-all resolver — nested select from JoinPlan (v0.6.0).
@meshql/drizzle
@meshqljs/drizzle
Drizzle relational query resolver (v0.6.0).
@meshql/kysely
@meshqljs/kysely
Kysely + buildSelectSql — flat rows through the shaper (v0.6.0).
@meshql/http
@meshqljs/http
Header transport plus Express, Fastify, and Hono adapters.
@meshql/client
@meshqljs/client
Typed client for Node and browsers — auth, list queries, uploads, Web Crypto signing.
@meshql/upload
@meshqljs/upload
Multipart uploads with signed contentHash verification. Local, S3, and R2 storage.
@meshql/integrity
@meshqljs/integrity
Request signing and integrity token lifecycle.
@meshql/access
@meshqljs/access
Entity, row, and dynamic field access control.