meshql-client (@meshql/client)
Typed client SDK for MeshQL APIs.
Install
Section titled “Install”npm install meshql-client# ornpx jsr add @meshql/clientPublished on npm as meshql-client and JSR as @meshql/client.
Browser
Section titled “Browser”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 } },);Example
Section titled “Example”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.