Performance: REST vs GraphQL awareness
MEDIUM IMPACT
This affects how fast data loads on the page and how much data the browser processes, impacting load speed and interaction responsiveness.
GraphQL query: { user(id: "123") { name, posts { title }, friends { name } } }REST endpoints: GET /user/123, GET /user/123/posts, GET /user/123/friends
| Pattern | Network Requests | Payload Size | Rendering Delay | Verdict |
|---|---|---|---|---|
| Multiple REST calls | Multiple HTTP requests | Larger due to over-fetching | Higher due to waiting on all requests | [X] Bad |
| GraphQL single query | Single HTTP request | Smaller, only requested fields | Lower, data ready sooner | [OK] Good |