I'm trying to create an Alert class as follows:
@ObjectType()
export class Alert {
@Field()
status: 'error' | 'success' | 'warning' | 'info' | undefined
@Field(() => [String])
messages: string[];
}
However, it gives me the following error message:
Error: Unable to infer GraphQL type from TypeScript reflection system. You need to provide explicit type for 'status' of 'Alert' class.