Interview Questions/System Design/Design a GraphQL Gateway at Scale
IntermediateSystem-Design
30 min

Design a GraphQL Gateway at Scale

APIsGraphQLCachingSecurity
Advertisement
Interview Question

Design a federated GraphQL gateway that composes multiple subgraphs, with caching, authorization, and schema evolution.

Key Points to Cover
  • Schema federation, composition, and versioning
  • Resolver performance, batching (DataLoader), N+1 mitigation
  • Edge caching for query result subsets and persisted queries
  • AuthN/Z directives and field-level enforcement
  • Observability: per-field latency, error budgets
Evaluation Rubric
Sound federation & schema evolution25% weight
Mitigates N+1 and latency hotspots25% weight
Effective GraphQL caching & persisted queries25% weight
Auth patterns at field level25% weight
Hints
  • 💡Persisted queries reduce parse/validation overhead.
Potential Follow-up Questions
  • How do you deprecate fields safely?
  • How to rate-limit queries?
Advertisement