Migrating from Apollo Tooling to GraphQL Codegen at Yelp
Yelp replaced the deprecated apollo-tooling codegen with GraphQL Codegen across a 500+ package React/TypeScript monorepo without requiring developers to change imports or queries. Rather than adopting gql.tada or Codegen's native client preset, the team patched the typescript-operations plugin and near-operation-file preset to emit apollo-tooling-compatible output: per-operation file names, inlined enums and input types, plain `T | null` instead of Maybe/Exact wrappers, and field-only nested type names. The patches also fixed a concurrency problem where multiple processes regenerated shared fragments. The changes were upstreamed into GraphQL Codegen v6 in collaboration with its maintainer. The remaining few hundred type errors were fixed incrementally, with Claude's help, using a shrinking allowlist of packages still on the old tool.
Related posts
- Migrating a Large Flow Monorepo to TypeScript
Yelp Engineering mediumAdeptYelp migrated 1.4 million lines of Flow-typed JavaScript in a Lerna monorepo to TypeScript over three and a half years, converting one package at a time without ever bulk-disabling typechecking. Packages were converted bottom-up with flowts (later Stripe's flow-to-typescript-codemod), and flowgen turned the generated .d.ts files back into Flow headers so unconverted Flow code still typechecked against them. A dependency-graph importance score, Graphviz visualizations, auto-filed Jira tickets and quarterly deadlines kept the long tail moving. The result was 96.44% type coverage versus 83.15% under Flow, about 6,000 @ts-expect-error directives, and 82% of surveyed engineers reporting higher productivity. Early-2023 LLMs and cron-driven auto-conversion did not prove reliable enough to use.
- Third Time's the Charm: Deprecating KAWS
Artsy Engineering mediumAdeptArtsy retired KAWS, a standalone Node.js/Mongo/TypeGraphQL service that stored artwork "collections" as Elasticsearch queries, and folded it into its main Rails API, Gravity. KAWS was retired for its idiosyncratic stack, high lottery factor, extra request hops through Metaphysics, and spreadsheet-plus-Jenkins admin workflow. The deprecation succeeded on the third attempt because it was tied to a business need and tightly scoped to 100% GraphQL schema compatibility for used fields. Lessons include dropping a premature artwork-collection join model whose Sidekiq jobs choked on collections with hundreds of thousands of works, and discovering that env-var feature flags on a GraphQL server leak schema changes to clients when CI pulls the schema from staging, blocking deploys.
- Medium Android App — Migrating from Apollo Kotlin 3 to 4: Lessons Learned
Medium Engineering mediumAdeptUpgrading Medium's Android app from Apollo Kotlin 3 to 4 surfaced CacheMissException errors across every watch()-based UI, because v4 delivers fetch errors through ApolloResponse instead of throwing or silently dropping them. The root cause was a flawed programmatic CacheKeyGenerator, fixed by switching to declarative @typePolicy/@fieldPolicy cache IDs and adding __typename to all operations. A safeWatch wrapper filters expected exceptions per fetch policy (cache misses under CacheFirst/CacheAndNetwork, network errors under NetworkFirst) so the UI only sees meaningful failures. Fragment cache-update extension functions, a custom Currency scalar adapter, and planned HTTP batching and persisted queries round out the upgrade.
- How pg_graphql works
Supabase mediumAdeptpg_graphql is a Rust-based Postgres extension that reflects the SQL schema as a GraphQL schema and serves queries through a `graphql.resolve` SQL function, with no separate server. A request is tokenized and parsed into an AST with the graphql-parser crate, then validated against the GraphQL spec using a reflected schema built from system catalogs. That schema is memoized and reloaded only when the search path, role or schema version changes. Validated queries become builder objects that emit SQL, with quote_ident/quote_literal guarding against injection, and the SQL returns jsonb that is passed back to the client as JSON.
- How we use GraphQL at Europe's largest fashion e-commerce company
Zalando Engineering easyNoviceZalando replaced a sprawl of per-page and per-platform Backend-for-Frontend services with a single unified GraphQL API owned via a shared monorepo across 12+ domain teams. The BFFs had duplicated effort, fragmented security and observability, and produced inconsistent data across web and app. The graph is built on Entities such as Product and Campaign and runs on their own GraphQL engine, graphql-jit, under a strict no-business-logic rule. Since 2018 it has grown to serve over 80% of web and 50% of app use cases, with adoption driven by documentation, training and schema consultation, and god-component risk handled through contribution principles, circuit breakers, timeouts, retries and per-platform bulkhead deployments.