Kysely Interface to GraphQL Schema Generator
Convert Kysely table interfaces, Generated<T>, and ColumnType constructs into production-ready GraphQL SDL.
At a glance
Kysely Interface to GraphQL Schema Generator is a free developer utility that transforms Kysely TypeScript table interfaces into GraphQL Schema Definition Language (SDL). It unwraps Generated<T> and ColumnType helpers, handles inverted nullability, and synthesizes root queries, mutations, and inputs 100% client-side in browser memory.
100% Client-Side Kysely Interface to GraphQL SDL Generator
Zero Server UploadsConvert Kysely TypeScript table interfaces, Generated<T>, and ColumnType constructs into GraphQL SDL types, operations, and input objects.
Inverted Nullability Mapping
TypeScript required fields (without | null or ?) become non-null Type! in GraphQL, while union nullable types map to unadorned optional GraphQL fields.
Kysely Helpers Unwrapped
Automatically unwraps Generated<T> and ColumnType<Select, Insert, Update>. Database-generated fields are excluded from mutation input objects.
Virtual Relations & Operations
Synthesizes graph relations from foreign keys (e.g. author_id → author: User!) and generates complete root queries, mutations, and typed input payloads.
Why Use This Kysely Interface to GraphQL Schema Generator?
How to Use Kysely Interface to GraphQL Schema Generator
Input Kysely Code
Paste your TypeScript Kysely table interfaces into the editor or upload a .ts file.
Configure Options
Toggle table suffix stripping, queries, mutations, input types, and virtual relations.
Copy or Download
Copy the generated GraphQL SDL or download it as schema.graphql.
Kysely Interface to GraphQL Conversion example
Converts a Kysely UserTable interface with Generated id and nullable email into GraphQL SDL with inverted nullability.
export interface UserTable {
id: Generated<number>;
name: string;
email: string | null;
}
type User {
id: ID!
name: String!
email: String
}
type Query {
users: [User!]!
user(id: ID!): User
}
Technical Specifications & Engine Details
| Specification | Details |
|---|---|
| Supported Constructs | interface, type, Database/DB map, Generated<T>, ColumnType<S,I,U>, enums |
| Execution Mode | 100% Client-Side In-Browser (Zero server latency) |
| Nullability Mapping | Inverted (Kysely required → GraphQL !, nullable/optional → unadorned) |
| Generated Output | GraphQL SDL (Types, Enums, Queries, Mutations, Inputs) |
100% Client-Side Privacy Guarantee
Your files remain strictly on your local device. Zero data is transmitted to external servers.
Frequently Asked Questions
How does Kysely inverted nullability map to GraphQL SDL?
How are Kysely Generated<T> and ColumnType helpers handled?
Are foreign keys converted to GraphQL object relations?
Is any TypeScript code sent to external servers?
Methodology
This tool runs entirely in your browser. The example above shows a representative input and the result it produces.
Last updated .