Can I change an existing non-required field to a required field

#1

Can I change an existing non-required field to a required field?

Suppose I have been loading data to type ‘FixedAsset’ with non-required field ‘name’. Can I remix ‘FixedAsset’ and make the ‘name’ field now required? What would happen to old data with ‘name’ field left empty?

#2

Yes. You can change an existing non-required field to a required field.

remix type FixedAsset {
name: !~ // in this case, tilde represents the original field type ‘string’
}

Existing empty data would remain intact. The required field will be enforced when you load new data.