Bird
0
0

Identify the error in this input type definition:

medium📝 Debug Q6 of 15
GraphQL - Schema Definition Language (SDL)
Identify the error in this input type definition:
input ProductInput { id: ID!, name: String, price: Float! }
AID type cannot be used in input types
BCommas are not allowed between fields in input types
CFields cannot be marked as non-nullable in input types
DInput types must have at least one field without exclamation
Step-by-Step Solution
Solution:
  1. Step 1: Review input type field syntax

    Fields in input types are separated by new lines or spaces, not commas.
  2. Step 2: Check other options

    ID is valid in input types, non-nullable fields are allowed, and no rule about exclamation marks count.
  3. Final Answer:

    Commas are not allowed between fields in input types -> Option B
  4. Quick Check:

    No commas between fields in input types [OK]
Quick Trick: Do not use commas between input type fields [OK]
Common Mistakes:
  • Adding commas between fields like in JSON
  • Thinking ID is invalid in input types
  • Believing all fields must be nullable

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes