REST vs GraphQL
systemdesignbutsimple.com·6w·
Discuss: r/programming

Both REST and GraphQL let clients talk to servers over HTTP. Both return data (usually JSON). Both are widely used in production. So what’s the difference between them?

It comes down to one core trade-off: REST prioritizes simplicity and standardization. GraphQL prioritizes flexibility and efficiency.

REST (Representational State Transfer) organizes your API around resources. Each resource gets its own URL, and you use HTTP methods to interact with it.

The server decides what data each endpoint returns. If you call GET /users/123, you get whatever fields the backend team decided to include: name, email, address, preferences, etc.

Over-fetching: You only need the user’s name, but the endpoint returns 50 fields. You’re transferring data you’ll never use.

**Under…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help