Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Zalando Engineering 6 min read Case study easyNovice

How we use GraphQL at Europe's largest fashion e-commerce company

Zalando 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.

Related posts

  • Micro Frontends: from Fragments to Renderers (Part 1)

    Zalando Engineering easyNovice

    Zalando replaced its Mosaic micro-frontend architecture, built on team-owned page Fragments, with Interface Framework, a unified platform where pages are trees of typed Entities (Product, Collection, Outfit) mapped via declarative rendering rules to React Renderers that declare data needs in GraphQL. A Node.js/browser Rendering Engine resolves and renders the Entity tree chosen by the recommendation system, with built-in monitoring, batched A/B testing, deployment previews against production, and performance gates such as Lighthouse CI, bundle size limits and Web Vitals reporting. Moving teams into a monorepo with a shared stack lowered the entry barrier and improved UX consistency, at the cost of blurred ownership. A hybrid mode serving Fragments and Renderers together eased migration, and about 90% of traffic now runs on IF.

  • More Editorial Content, please.

    Zalando Engineering mediumAdept

    Zalando replaced a legacy, engineering-heavy landing page tool with a system built on the headless CMS Contentful, integrated into its Interface Framework via a Contentful proxy service behind the Fashion Store GraphQL aggregator, with modules mapped to renderers shared across web and app. Pages are composed from reorderable module entries, and other teams can contribute new modules, as the Sustainability team did with a certificate module that enriches Contentful-stored IDs with data from the same service used on product detail pages. Time-to-go-live fell from 2 days to 4 hours, the 2-week lead time was removed, and published landing pages rose 82% year over year.

  • GraphQL persisted queries and Schema stability

    Zalando Engineering mediumAdept

    Zalando disables arbitrary GraphQL queries in production and accepts only query IDs that were persisted at build time, where an ID is a hash of the normalized query. Because every production query is known, the team can monitor and alert per query and tell which schema fields are unused and therefore safe to break. On top of this they add schema directives: @draft blocks a field from being persisted so it can be merged, deployed and changed freely. @component and @allowedFor restrict an experimental field to specific UI components, so a breaking change only touches those callers. Fields move from draft to restricted to stable, which lets the schema evolve without long-lived feature branches across microservices.

  • Optimize GraphQL Server with Lookaheads

    Zalando Engineering mediumAdept

    Zalando's GraphQL server uses lookaheads on the resolver's info AST (fieldNodes and selection sets) to work out which sub-fields a query requests, then forwards them to backends that support partial responses via a fields parameter. Dependency maps translate schema fields to backend object paths for the request, and per-field transformer maps build the schema response from partial backend data without null-check sprawl. DataLoader batches product lookups across a query by merging ids and taking the union of requested backend fields, since most backends can't select different fields per id.

  • Shopify’s journey to faster breadth-first GraphQL execution

    Shopify Engineering hardMaster

    Shopify built GraphQL Cardinal, a breadth-first GraphQL execution engine that calls each field resolver once with the full set of objects at that level instead of once per object. Depth-first execution, used by graphql-ruby and graphql-js, multiplies per-field overhead from tracing hooks, authorization and dataloader promises by response breadth. Cardinal builds a typed execution tree, runs a bottom-up lookbehind planning pass inspired by Grafast, and executes generation by generation with flat object/result sets in a queue-driven loop rather than recursion. Large list queries ran up to 15x faster with 90% less memory and saved over 4s at P50. The tradeoffs are that errors are inlined and located by a final depth traversal, and that migrating a monolith from one-in/one-out resolvers requires an incremental bridge.

The quest for software engineering knowledge.

Look:
Layout: