Skip to content

Support required enum fields - a.enum().required() #570

@naedx

Description

@naedx

Is your feature request related to a problem? Please describe.
It is currently not possible to mark an enum field as required.

Describe the solution you'd like
Support calling .required() as in a.enum().required() to mark the field as required.

Describe alternatives you've considered
Replacing any required enum with a required string and manually validating and restricting the values with a custom resolver. This would mean that I lose all benefit of enums. This would mean I would now have more code to manage just to implement an enum.

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions