Recall & Review
beginner
What is over-fetching in GraphQL?
Over-fetching happens when a query asks for more data than needed, causing extra information to be sent and slowing down the app.
Click to reveal answer
beginner
What does under-fetching mean in GraphQL?
Under-fetching occurs when a query does not request enough data, so the app must make multiple requests to get all needed information.
Click to reveal answer
beginner
How does GraphQL help solve over-fetching and under-fetching problems?
GraphQL lets clients ask exactly for the data they want, no more and no less, which avoids both over-fetching and under-fetching.
Click to reveal answer
intermediate
Give an example of over-fetching in a REST API compared to GraphQL.
In REST, a user profile endpoint might return all user info even if the app only needs the name. In GraphQL, the query can ask just for the name, avoiding extra data.
Click to reveal answer
intermediate
Why can under-fetching cause performance issues?
Under-fetching causes multiple network requests to get all needed data, which slows down the app and uses more resources.
Click to reveal answer
What problem does over-fetching cause?
✗ Incorrect
Over-fetching means the query returns more data than the app actually needs.
Under-fetching leads to:
✗ Incorrect
Under-fetching means not enough data is returned, so the app must make more requests.
How does GraphQL prevent over-fetching?
✗ Incorrect
GraphQL queries specify exactly which fields to return, avoiding extra data.
Which is a common cause of under-fetching?
✗ Incorrect
Under-fetching happens when the query misses fields needed by the app.
What is a benefit of avoiding over-fetching and under-fetching?
✗ Incorrect
Getting just the right data improves speed and user experience.
Explain over-fetching and under-fetching problems in simple terms.
Think about asking for too much or too little data.
You got /3 concepts.
How does GraphQL help fix over-fetching and under-fetching issues compared to REST APIs?
Focus on how GraphQL queries work.
You got /3 concepts.