Bird
0
0

Find the mistake in this query:

medium📝 Debug Q7 of 15
GraphQL - Queries
Find the mistake in this query:
{ author(id: 3) { name books { title, reviews { rating } } } }
AMissing argument for books field
Breviews field should not be nested
CUsing commas between fields inside braces
Dauthor field cannot have nested fields
Step-by-Step Solution
Solution:
  1. Step 1: Check GraphQL field syntax

    GraphQL does not use commas between fields inside braces.
  2. Step 2: Identify syntax error

    The commas after title and before reviews cause syntax errors.
  3. Final Answer:

    Using commas between fields inside braces -> Option C
  4. Quick Check:

    No commas between fields in GraphQL queries [OK]
Quick Trick: Do not use commas between fields in GraphQL queries [OK]
Common Mistakes:
  • Adding commas between fields
  • Assuming commas are required like JSON
  • Misplacing commas inside nested fields

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes