Enums
Use the t.enum
type factory to create enums:
const Membership = t.enum({
name: 'Membership',
values: {
free: null,
paid: null,
enterprise: null,
},
});
/** TypeScript */
type Membersip = 'free' | 'paid' | 'enterprise';
# GraphQL
enum Membership {
free
paid
enterprise
}