SpinTheMic
Pro

Interview practice question

Changing a field's type

Backend Engineering · API Design · Intermediate

A field "price" is returned as a number, but you need to switch to a string for precision. How do you make this change safely?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Changing type breaks clients.
  • Add new field (price_amount as string).
  • Keep old field during transition.
  • Deprecate old field.
  • Remove in new version.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics