Bird
0
0

Consider this GraphQL query:

medium📝 query result Q5 of 15
GraphQL - Queries
Consider this GraphQL query:
{ user { id profile { email phone } } }

Which fields will be included in the response?
AOnly user id and profile email
BUser id, profile email, and profile phone
CUser id only
DUser id and all profile fields
Step-by-Step Solution
Solution:
  1. Step 1: Identify requested fields

    The query requests user id and inside profile, email and phone fields.
  2. Step 2: Understand nested field selection

    Only the specified nested fields email and phone are returned, not all profile fields.
  3. Final Answer:

    User id, profile email, and profile phone -> Option B
  4. Quick Check:

    Nested fields returned = Specified nested fields [OK]
Quick Trick: Nested fields return only selected subfields [OK]
Common Mistakes:
  • Assuming all profile fields are returned
  • Ignoring nested fields
  • Expecting only top-level fields

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes