Bird
0
0

You have this schema:

hard📝 Application Q9 of 15
GraphQL - Basics and Philosophy
You have this schema:
type Query { users: [User!]! }

What does the type of 'users' field mean?
AReturns a nullable list of nullable User objects
BReturns a non-null list of nullable User objects
CReturns a list that can be null but contains non-null Users
DReturns a non-null list of non-null User objects
Step-by-Step Solution
Solution:
  1. Step 1: Break down the type syntax

    [User!]! means a list that cannot be null (!) containing User objects that cannot be null (!).
  2. Step 2: Interpret nullability

    The outer ! means list itself is non-null, inner ! means each User is non-null.
  3. Final Answer:

    Returns a non-null list of non-null User objects -> Option D
  4. Quick Check:

    List! of User! = non-null list of non-null items [OK]
Quick Trick: Outer ! = list non-null, inner ! = items non-null [OK]
Common Mistakes:
  • Mixing up nullability of list vs items
  • Assuming list or items can be null
  • Ignoring exclamation mark positions

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes