API Design · Senior · Question 40 of 75
What problem do 'field masks' solve in update operations?
- ✓Correct answer: They state exactly which fields an update touches (e.g.
updateMask=name,address), so missing fields aren't accidentally cleared and new fields stay safe - 2They hide fields in logs
- 3They encrypt sensitive fields
Explanation
Without a mask, older clients that don't know a new field may wipe it with a full PUT.