API Design · Senior · Question 22 of 75
How should a GraphQL schema model mutations for good client experience?
- 1One generic
update(table, json)mutation - 2Mutations should return only booleans
- ✓Correct answer: Specific mutations with input types and payload types that return the changed objects and expected business errors
Explanation
Returning changed objects lets normalized client caches update without refetching.