Bird
0
0

Which of the following is the correct syntax for an inline fragment on type User?

easy📝 Syntax Q3 of 15
GraphQL - Queries
Which of the following is the correct syntax for an inline fragment on type User?
A... on User { name email }
B... User { name email }
C... onUser { name email }
D... on User (name email)
Step-by-Step Solution
Solution:
  1. Step 1: Recall inline fragment syntax

    The correct syntax is three dots, 'on', then the type name, followed by fields in braces.
  2. Step 2: Check each option

    Only ... on User { name email } matches the correct syntax exactly.
  3. Final Answer:

    ... on User { name email } -> Option A
  4. Quick Check:

    Inline fragment syntax = ... on Type { fields } [OK]
Quick Trick: Inline fragments start with '... on Type' followed by fields [OK]
Common Mistakes:
  • Omitting 'on' keyword
  • Missing spaces between 'on' and type
  • Using parentheses instead of braces

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes