Migrating from Apollo Tooling to GraphQL Codegen at Yelp
-
Igor Kusakov, Software Engineer
- Jul 16, 2026
Introduction At Yelp, we rely heavily on GraphQL and Apollo for data loading in our frontend React monorepo. When a developer writes a GraphQL query or mutation inside a React component, the shape of the response is defined by the query itself — but TypeScript has no way to know what that shape looks like at compile time. That’s where code generation (codegen) comes in. We rely on codegen to read our queries and server schema, then produce TypeScript type definitions for every operation’s input variables and output data. In our codebase, this looks like: src/components/UserProfile/ ├── UserProfile.tsx ← contains...