Write an Architecture Decision Record for migrating from REST to GraphQL
Context
A mid-size SaaS platform team is evaluating migrating their public API from REST to GraphQL. The lead architect must produce an Architecture Decision Record that documents the rationale, trade-offs, and implementation constraints for the engineering leadership to approve or reject the proposal.
Before (Unstructured)
"Write an Architecture Decision Record for migrating from REST to GraphQL."
What is missing
- × No organizational context — team size, current architecture, or scale mentioned
- × No decision framework — how should alternatives be evaluated?
- × No constraints — timeline, backward compatibility, or performance requirements
- × No audience defined — who reviews and approves this ADR?
- × No success criteria — what makes this ADR decision-ready?
After (MOTIVE-Structured)
As the lead architect for a SaaS platform serving 2,000+ API consumers, I need an Architecture Decision Record because the team is evaluating REST-to-GraphQL migration, and engineering leadership requires a documented rationale to approve or reject the proposal.
Deliver an ADR following the Michael Nygard template with sections: Context, Decision, Status, Consequences. Success criteria: (1) All three alternatives evaluated with pros/cons, (2) Migration risks quantified, (3) Backward compatibility strategy defined.
Use the Michael Nygard ADR template. Apply the C4 model for architecture context. Reference the GraphQL Foundation best practices for API design patterns.
1. Document current REST API architecture (endpoints, traffic, pain points). 2. Define evaluation criteria (performance, developer experience, maintenance cost, backward compatibility). 3. Evaluate three alternatives: (a) Full GraphQL migration, (b) GraphQL gateway over REST, (c) Hybrid approach. 4. Recommend one option with phased rollout plan. If performance benchmarks are unavailable, flag as requiring proof-of-concept.
Current state: 47 REST endpoints, 2,000+ consumers, 50M requests/month. Team: 4 backend engineers. Audience: VP Engineering, Staff Engineers. Format: ADR markdown document. Timeline constraint: Decision needed by end of Q2. Exclude: Frontend framework changes, authentication redesign.
Output Comparison
Before Output
GraphQL is better than REST because it allows clients to request only the data they need. You should migrate to GraphQL to improve your API. It will reduce over-fetching and under-fetching problems. Many companies like Facebook and GitHub use GraphQL.
Show full output
After Output
Alternative B: GraphQL Gateway over REST (Recommended). Evaluation: Performance: +15% reduction in payload size (estimated from current 47-endpoint over-fetching analysis). Developer Experience: New consumers use GraphQL; existing 2,000+ consumers retain REST unchanged. Migration Risk: LOW — no breaking changes to existing contracts. Cost: 3 engineer-months for gateway layer. Backward Compatibility: Full — REST endpoints remain operational indefinitely.
Show full output
Evaluation Scores
Key Improvement
The Variables component produced the largest impact by specifying the 2,000+ consumer base, 50M monthly requests, and backward compatibility requirement — forcing the analysis to address real constraints rather than abstract technology preferences.