API Design · Middle · Question 43 of 75
Why is HTTP caching harder with GraphQL than with REST?
- 1GraphQL forbids caching
- 2GraphQL responses are binary
- ✓Correct answer: Queries usually go as POST to one URL with varying bodies, so URL-based HTTP caches can't key on them; persisted queries via GET help
Explanation
GraphQL clients like Apollo or Relay cache normalized objects on the client instead.