Bird
0
0

Why might a delete mutation return the deleted item's data instead of just a success flag?

hard📝 Conceptual Q10 of 15
GraphQL - Mutations

Why might a delete mutation return the deleted item's data instead of just a success flag?

ATo confirm exactly what was deleted and provide details
BBecause GraphQL requires returning full data always
CTo allow clients to undo the deletion automatically
DTo update the schema with deleted data
Step-by-Step Solution
Solution:
  1. Step 1: Understand mutation return choices

    Returning deleted item data helps clients confirm what was removed and update UI accordingly.
  2. Step 2: Evaluate other options

    GraphQL does not require full data always; undo is client logic; schema is not updated with deleted data.
  3. Final Answer:

    To confirm exactly what was deleted and provide details -> Option A
  4. Quick Check:

    Deleted data return = confirmation and detail [OK]
Quick Trick: Return deleted data to confirm what was removed [OK]
Common Mistakes:
  • Thinking GraphQL always returns full data
  • Assuming automatic undo from mutation response
  • Confusing schema updates with data return

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More GraphQL Quizzes