System Design · Middle · Question 5 of 75

What is the main trade-off of GraphQL compared to REST?

Explanation

GraphQL solves over- and under-fetching and provides a typed schema. But queries go via POST to a single endpoint, so URL-based CDN caching doesn't work out of the box; you need a normalized client cache (Apollo, urql), complexity limits and persisted queries.

Further reading

Problem with a question

System Design · Middle · question 5

Test yourself

Take the System Design · Middle quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz