Bird
0
0

Identify the error in this GraphQL query that causes under-fetching:

medium📝 Debug Q14 of 15
GraphQL - Basics and Philosophy
Identify the error in this GraphQL query that causes under-fetching:
{ user { name } }

The client needs the user's name and email.
AThe query is missing the <code>email</code> field
BThe query has a syntax error in braces
CThe query requests too many fields
DThe query uses incorrect field names
Step-by-Step Solution
Solution:
  1. Step 1: Check requested fields

    The query requests only name, missing email.
  2. Step 2: Compare with client needs

    The client needs both name and email, so missing email causes under-fetching.
  3. Final Answer:

    The query is missing the email field -> Option A
  4. Quick Check:

    Missing needed fields = under-fetching [OK]
Quick Trick: Check if all needed fields are requested [OK]
Common Mistakes:
  • Assuming syntax error when none exists
  • Thinking too many fields cause under-fetching
  • Ignoring missing fields as a problem

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes