Bird
0
0

Given this GraphQL query result:

medium📝 query result Q4 of 15
GraphQL - Schema Definition Language (SDL)
Given this GraphQL query result:
{ price: 12 }
Which scalar type is most likely used for the field "price"?
AFloat
BBoolean
CString
DInt
Step-by-Step Solution
Solution:
  1. Step 1: Analyze the value type in the result

    The value 12 is a whole number without decimals.
  2. Step 2: Match value type to scalar type

    Int represents whole numbers, Float represents decimals, String is text, Boolean is true/false.
  3. Final Answer:

    Int -> Option D
  4. Quick Check:

    Whole number value = Int = B [OK]
Quick Trick: Whole numbers use Int, decimals use Float [OK]
Common Mistakes:
  • Choosing Float for whole numbers
  • Using String for numbers
  • Confusing Boolean with Int

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes