For a small app, REST is usually the simpler choice. GraphQL becomes attractive when your frontend needs to request lots of different shapes of data.
| REST | GraphQL |
|---|
| How you request data | Multiple URLs/endpoints | Usually one endpoint with a query |
| Data shape | Server decides the response | Client specifies the fields it wants |
| Example | GET /users/123 | Query user(id: 123) { name email } |
| Over/under-fetching | More common | Much less common |
| Caching | Straightforward HTTP caching | More complicated |
| Setup | Simple | More infrastructure/schema/tooling |
| Learning curve | Low | Higher |
| Best fit | CRUD apps, simple APIs | Complex UIs, many related data needs |
Practical example
Suppose you're building a small blog.
With REST, you might have:
GET /posts/42
GET /posts/42/comments
GET /users/7
Your frontend may need three requests to construct one screen.
With GraphQL, you could request everything needed in one query:
query {
post(id: 42) {
title
body
author {
name
}
comments {
text
author {
name
}
}
}
}
The advantage is the client gets almost exactly what it needs.
The catch
GraphQL isn't simply "REST but better." You take on additional complexity:
- Designing and maintaining a schema
- Query validation and authorization
- Handling caching
- Preventing expensive/deep queries
- More tooling and concepts for developers to learn
For a small app, that complexity often isn't worth it.
My rule of thumb
Choose REST if:
- You have a relatively simple CRUD application.
- You control both frontend and backend.
- Your resources map naturally to URLs.
- You want the simplest deployment and debugging experience.
Choose GraphQL if:
- You have a complex frontend with many different screens needing different data.
- Your data has lots of relationships.
- You expect multiple clients (web, mobile, etc.) with substantially different data requirements.
- Avoiding multiple API requests is genuinely becoming a problem.
For a typical small app I'd start with REST. If the API becomes awkward because every new screen requires new endpoints or lots of client-side requests, that's a good signal to consider GraphQL.