Bird
0
0

You want to fetch a list of users with their id, name, and their posts titles only. Which query correctly requests this specific data?

hard📝 Application Q8 of 15
GraphQL - Queries
You want to fetch a list of users with their id, name, and their posts titles only. Which query correctly requests this specific data?
A{ users { id name posts title } }
B{ users { id, name, posts { title } } }
C{ users { id name posts { title } } }
D{ users { id name posts: title } }
Step-by-Step Solution
Solution:
  1. Step 1: Review correct GraphQL nested field syntax

    Fields are nested with braces; commas are not used between fields.
  2. Step 2: Evaluate each option

    { users { id name posts { title } } } correctly nests posts { title } inside users without commas or incorrect syntax.
  3. Final Answer:

    { users { id name posts { title } } } -> Option C
  4. Quick Check:

    Correct nested field syntax = { users { id name posts { title } } } [OK]
Quick Trick: Nest fields with braces, no commas [OK]
Common Mistakes:
  • Using commas between fields
  • Placing nested fields incorrectly
  • Using colon instead of braces for nesting

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes