-
I have tried to define GraphQL enum and passed it into @Property({type:...}) But it doesn't work. Hope to receive DryerJs Team support as soon as possible. Best regards. |
Beta Was this translation helpful? Give feedback.
Answered by
vanpho93
Jan 29, 2024
Replies: 1 comment
-
Hey @baroxdev, Thanks for reaching out, Did you call registerEnumType registerEnumType(UserRole, { name: 'UserRole' });
@Definition({ timestamps: true })
export class User {
@Property({
db: { type: String, enum: UserRole, default: UserRole.USER },
update: Skip,
})
role: UserRole;
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
vanpho93
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @baroxdev,
Thanks for reaching out,
Did you call registerEnumType