Home
← All questions

REST vs GraphQL trade-offs | Web Fundamentals

MediumPremiumWeb Fundamentals

Asked at Meta · Netflix · Shopify

Web Fundamentals interview practice: Compare REST and GraphQL for frontend architecture decisions.

Answer

REST: resource-oriented URLs, multiple endpoints, server shapes responses. Simple caching (URL = cache key), predictable, works well with CDNs.

GraphQL: single endpoint, client specifies fields in query. Reduces over/under-fetching, strong typing via schema, great for mobile/slow networks with varied data needs.

RESTGraphQL
Over-fetchingCommonClient picks fields
N+1 / multiple round tripsMultiple endpointsBatched in one request
CachingHTTP cache nativeNeeds normalized client cache (Apollo/Relay)
Versioning/v2/usersDeprecate fields in schema
ComplexityLower serverResolver layer, query cost limits
Premium question

Unlock the full model answer with Mentoxis Premium.

Unlock with Premium