Kizaki
ReferenceTypeScript

@kizaki/schema

The generated schema package exports typed entity objects that power both query builders and TypeScript types.

Import Surface

import { Project } from "@kizaki/schema";

Each generated entity object is:

  • a runtime query target
  • a source of typed field refs
  • a TypeScript row type via inference

When To Use It

Use @kizaki/schema whenever your code needs to refer to a schema entity in a typed way. It is the shared language between server-side queries and browser query objects.

Example

import { Project } from "@kizaki/schema";
import { query, select } from "@kizaki/sdk";

await query(select(Project).fields(Project.id, Project.name));

You should not hand-maintain a parallel entity model in application code. The generated schema package is the contract.

Related guide: Query Data In The Browser

On this page