amplify-category-api
amplify-category-api copied to clipboard
Support default for enum fields
Describe the feature you'd like to request
The enum type doesn't currently support defining default value, e.g. this will not work:
a.enum(["a", "b"]).default("a")
Describe the solution you'd like
Code like above works, just like with other field types.
Describe alternatives you've considered
Had to use another field type (boolean or integer)
Additional context
No response
Is this something that you'd be interested in working on?
- [ ] 👋 I may be able to implement this feature request
Would this feature include a breaking change?
- [ ] ⚠️ This feature might incur a breaking change
Hi @pjoe , Thank you for rasing this. we are marking this as a feature request for the team to evaluate further.
I would also be interested in this being supported.
ditto
Is this related to the issue with making an enum field required? I can't use a.enum().required()
.