Schemas that grow with your code.
Pothos is a plugin-based GraphQL schema builder for TypeScript. Zero runtime overhead, no codegen, end-to-end inference — at the scale of Airbnb, Netflix, and your weekend project.
import SchemaBuilder from '@pothos/core';// Pothos infers field shapes from the builder generic.const builder = new SchemaBuilder<{ Context: Context }>();builder.objectType('User', {fields: (t) => ({id: t.exposeID('id'),name: t.exposeString('name'),posts: t.field({ type: [Post], resolve: loadPosts }),}),});
Inference, all the way down.
Define a type once. Pothos walks your code and infers the shape of arguments, return types, and context across resolvers. No codegen step, no decorators, no any escape hatches.
One ecosystem. Every shape.
Efficient Prisma integration that solves N+1 queries and resolves nested fields the smart way.
Drizzle's relational query builder, type-safe and N+1-free out of the box.
Cursor-based connections, Node interfaces, and helpers for the Relay spec — done right.
Field- and type-level authorization checks with scope composition.
Inline data-loaders on your types and fields — no per-app setup ceremony.
Strongly-typed errors as union return types, with auto-resolved success types.
Argument validation via any StandardSchema v1 library — Zod, Valibot, ArkType.
Resolver tracing with adapters for OpenTelemetry, New Relic, Sentry, custom.
Type-safe GraphQL directives for fields, types, and arguments.
Subscribe to any part of your graph — Pothos figures out what to invalidate.
Per-field complexity scoring + query-level limits to protect resolvers.
Apollo Federation 2 schemas, the Pothos way.