GraphQL pain
40 resolvers, N+1 debugging, and codegen eating your types.

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 — no resolver per field.
40 resolvers, N+1 debugging, and codegen eating your types.
Every client wants a different ?include= and you ship half the database.
Normal REST URLs. Query in headers. One resolver per entity. SQL you already write.
Published on JSR (@meshql/*) andnpm (meshql-*).
npm install meshql-core meshql-http meshql-client
npm i expressnpx jsr add @meshql/core @meshql/http @meshql/client
npm i expressNo database required for the first run — follow the5-minute guide or try theinteractive showcase.
// X-Mesh-Query (base64 JSON)
{
"user": {
"id": true,
"name": true,
"tokens": { "accessToken": true }
}
}// Response
{
"user": {
"id": 1,
"name": "Ada Lovelace",
"tokens": [{ "accessToken": "tok_ada" }]
}
}Entities, fields, joins — one resolver per root entity.
JSON or QL in X-Mesh-Query. The SDK encodes it for you.
JoinPlan tells you what to fetch. Return flat SQL rows; get nested JSON.
Eleven focused libraries — install only what you need. Same semver on JSR and npm.
@meshql/coremeshql-core
Parser, planner, shaper, createMesh()
@meshql/sqlitemeshql-sqlite
buildSelectSql for node:sqlite, Bun, D1
@meshql/postgresmeshql-postgres
buildSelectSql with $1, $2 placeholders
@meshql/prismameshql-prisma
Prisma catch-all resolver — nested select
@meshql/drizzlemeshql-drizzle
Drizzle relational query resolver
@meshql/kyselymeshql-kysely
Kysely + buildSelectSql flat rows
@meshql/httpmeshql-http
Express, Fastify, and Hono adapters
@meshql/clientmeshql-client
Typed client — auth, lists, uploads, signing
@meshql/uploadmeshql-upload
Multipart uploads with contentHash verification
@meshql/integritymeshql-integrity
Request signing and integrity tokens
@meshql/accessmeshql-access
Entity, row, and field access control
GraphQL comparison, security, ORMs, migration — common questions.
Init a project, start Express, test with curl.
Prisma, Drizzle, and Kysely catch-all resolvers (v0.6.0).
Language-agnostic wire + JoinPlan + shaper for porters.
You own the pool — how MeshQL shares your client.
Schema, JoinPlan, shaper, and plugins.
Routes, headers, errors, and curl recipes.
Client shapes the response
JSON or QL queries via headers. The SDK handles encoding — browsers and Node.
One resolver per entity
JoinPlan tells you exactly which fields and joins to fetch. No N+1 resolver maze.
SQL-native
Optional buildSelectSql() for Postgres and SQLite, or ORM adapters for Prisma, Drizzle, and Kysely (v0.6.0).
Your DB connection
MeshQL does not pool connections — pass your Prisma client, pg.Pool, or Drizzle db into the resolver. See the connections guide.
Framework adapters
Express, Fastify, and Hono — plus Deno and Bun guides with the same HTTP contract.
Security plugins
Integrity signing and access control ship as optional @meshql/integrity and @meshql/access plugins.
Works everywhere
Node 22+, Bun, Deno, and modern browsers. JSR for source; npm for compiled ESM.