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 meshql-core meshql-http meshql-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 (meshql-*). Porting MeshQL? See the protocol specs.
@meshql/core
meshql-core
Parser, join planner, response shaper, and createMesh(). Custom plugins use MeshPlugin from core.
@meshql/postgres
meshql-postgres
buildSelectSql for Postgres ($1, $2, … placeholders).
@meshql/sqlite
meshql-sqlite
buildSelectSql for Node's built-in node:sqlite, Bun, and D1.
@meshql/prisma
meshql-prisma
Prisma catch-all resolver — nested select from JoinPlan (v0.6.0).
@meshql/drizzle
meshql-drizzle
Drizzle relational query resolver (v0.6.0).
@meshql/kysely
meshql-kysely
Kysely + buildSelectSql — flat rows through the shaper (v0.6.0).
@meshql/http
meshql-http
Header transport plus Express, Fastify, and Hono adapters.
@meshql/client
meshql-client
Typed client for Node and browsers — auth, list queries, uploads, Web Crypto signing.
@meshql/upload
meshql-upload
Multipart uploads with signed contentHash verification. Local, S3, and R2 storage.
@meshql/integrity
meshql-integrity
Request signing and integrity token lifecycle.
@meshql/access
meshql-access
Entity, row, and dynamic field access control.