Bird
0
0

This query in GraphQL Playground returns an error:

medium📝 Debug Q7 of 15
GraphQL - Basics and Philosophy
This query in GraphQL Playground returns an error:
query { book(id: "3") { title, author } }

What is the likely syntax issue?
AField names must be capitalized
BMissing parentheses around id argument
CThe query keyword is missing
DCommas are not allowed between fields in GraphQL queries
Step-by-Step Solution
Solution:
  1. Step 1: Review GraphQL field syntax

    Fields inside braces are separated by spaces or new lines, not commas.
  2. Step 2: Identify the error

    Commas between fields cause syntax errors in GraphQL queries.
  3. Final Answer:

    Commas are not allowed between fields in GraphQL queries -> Option D
  4. Quick Check:

    Syntax error = Commas between fields [OK]
Quick Trick: Do not use commas between fields in GraphQL queries [OK]
Common Mistakes:
  • Adding commas like in JSON or JavaScript
  • Thinking parentheses are needed around arguments
  • Assuming field names must be capitalized

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes