Skip to content

How do you use an Enum in your model? #87

Discussion options

You must be logged in to vote

Figured it out...

First, create an enumType as part of your model

export const ChatStatusEnumType = enumType(ChatStatus);

Second, can use t.field like so...

t.field(Saver.chatStatus.name, { type: ChatStatus.name });

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Frosty21
Comment options

@NateWritesCode
Comment options

Answer selected by NateWritesCode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants