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
-
I have a class
DatabaseAccess
value of status is
DbAccessStatus
which 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
ExtendedDbAccessStatus
that 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
status
can be of valueSomeOtherStatus
, but in my case, status would never be this value, in the db it will appear as one of theDbAccessStatus
values. 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