meshql-client
v0.6.0
Published
MeshQL typed client SDK
Downloads
1,501
Readme
@meshql/client
Typed client SDK for MeshQL APIs.
Install
npm install meshql-client
# or
npx jsr add @meshql/clientPublished on npm as meshql-client and JSR as @meshql/client.
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: "[email protected]", password: "demo" });
const posts = await client.query(
{ post: { id: true, title: true } },
{ list: { limit: 10 } },
);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.
