Bird
0
0

Given this GraphQL query:

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

What fields will be returned in the response?
A{ "book": { "title": "...", "author": { "name": "..." } } }
B{ "book": { "title": "...", "author": "..." } }
C{ "book": { "author": { "name": "..." } } }
D{ "book": { "title": "..." } }
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the query structure

    The query requests title and nested author with its name field.
  2. Step 2: Determine the response shape

    The response will include title and an author object containing name.
  3. Final Answer:

    { "book": { "title": "...", "author": { "name": "..." } } } -> Option A
  4. Quick Check:

    Nested fields return nested objects [OK]
Quick Trick: Nested fields return nested objects in response [OK]
Common Mistakes:
  • Expecting author as a string instead of object
  • Missing requested fields in response
  • Ignoring nested field structure

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes