🛡️ Full Type Safety
Every query, mutation, and subscription is fully typed with TypeScript, ensuring compile-time safety and excellent developer experience.
Build type-safe GraphQL queries with full IntelliSense support and zero runtime overhead
import { b } from './generated'
// Fully typed query with variables
const USER_QUERY = b.query('GetUser', { id: 'ID!' }, (b, v) => [
b.user({ id: v.id }, b => [
b.id(),
b.name(),
b.email(),
b.posts(b => [
b.id(),
b.title(),
b.publishedAt(),
])
])
])
// Type-safe output
type UserData = OutputOf<typeof USER_QUERY>
// Result:
// {
// readonly user: {
// readonly id: string
// readonly name: string | null
// readonly email: string
// readonly posts: readonly {
// readonly id: string
// readonly title: string
// readonly publishedAt: string | null
// }[]
// } | null
// }