Replies: 1 comment
-
|
I tend to create a separate enum with all the values you want available there. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a class
DatabaseAccessvalue of status is
DbAccessStatuswhich is an enum that looks something like this:enum DbAccessStatus { Invited = 'invited', Active = 'active', Deactivated = 'deactivated' }I want to be able to filter this field by
ExtendedDbAccessStatusthat would be an extension of the first enum and look something like this:enum ExtendedDbAccessStatus { ...DbAccessStatus, SomeOtherStatus = 'status' }when I generate the schema it will be implied that
statuscan be of valueSomeOtherStatus, but in my case, status would never be this value, in the db it will appear as one of theDbAccessStatusvalues. I simply want to have this value to be able to filter other statuses on the frontend. What would be the best way to do it?Beta Was this translation helpful? Give feedback.
All reactions