Type-safe by design · v4.0

Schemas that grow with your code.

Pothos is a plugin-based GraphQL schema builder for TypeScript. Build your schema with the builder and your data's types flow into every resolver — no codegen, no decorators. At the scale of Airbnb, Netflix, and your weekend project.

Read the guide MIT · open source
schema/user.tsTypeScript
import SchemaBuilder from '@pothos/core';
const builder = new SchemaBuilder<{ Context: Context }>();
// Type the object by its backing model.
const User = builder.objectRef<{ id: string; name: string }>('User');
User.implement({
fields: (t) => ({
id: t.exposeID('id'),
name: t.exposeString('name'),
// user and ctx arrive typed — no annotations.
posts: t.field({
type: [Post],
resolve: (user, _args, ctx) => loadPosts(user.id, ctx),
}),
}),
});

Inference, all the way down.

The types are TypeScript's own. The builder carries your context, backing models, and scalars through its generics, so every resolver's arguments, parent, and return type arrive already inferred — checked by the compiler. Nothing scans or reflects over your code; there's no codegen step and no any escape hatch.

0codegen steps
1peer dependency (graphql)
18first-party plugins
The plugin garden

One ecosystem. Every shape.

Browse all 18 plugins →
Trusted in production byAirbnbNetflixLinearHashnodeLyftTinybird