Skip to content

meshql-client (@meshql/client)

Typed client SDK for MeshQL APIs.

Terminal window
npm install meshql-client
# or
npx jsr add @meshql/client

Published on npm as meshql-client and JSR as @meshql/client.

The client runs in modern browsers — it uses fetch, FormData, Blob, and Web Crypto for signing and uploads. No Node Buffer or node:crypto required.

import { createAuthClient } from "meshql-client";
const client = createAuthClient({ url: "/mesh", format: "json" });
await client.login({ email: "ada@example.com", password: "demo" });
const posts = await client.query(
{ post: { id: true, title: true } },
{ list: { limit: 10 } },
);
import { createClient } from "meshql-client";
const client = createClient({ url: "http://localhost:3000/mesh" });
const user = await client.query({
user: { id: true, email: true, tokens: { accessToken: true } },
});
console.log(user.email);

JSR import: @meshql/client.