Bird
0
0

Given this GraphQL query:

medium📝 query result Q13 of 15
GraphQL - Queries
Given this GraphQL query:
{ book { title author { name } } }

What data will the query return?
AOnly the book titles
BAll book and author details
CBook titles and author names
DOnly author names
Step-by-Step Solution
Solution:
  1. Step 1: Analyze requested fields

    The query asks for title of book and inside author it asks for name.
  2. Step 2: Determine returned data

    It returns book titles plus the names of their authors only, no other details.
  3. Final Answer:

    Book titles and author names -> Option C
  4. Quick Check:

    Requested fields = title + author name [OK]
Quick Trick: Look inside braces to see exactly what fields are requested [OK]
Common Mistakes:
  • Assuming all author details are returned
  • Thinking only book titles come back
  • Confusing nested fields with flat fields

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes