更新时间:2022-05-23 03:09:20
这是最快的解决方案,只需启动即可.
This is the fastest fix, just to launch.
import { Field, ID, ObjectType } from 'type-graphql';
@ObjectType()
export class Recipe {
@Field(type => ID, { nullable: true })
id?: string;
@Field({ nullable: true })
title?: string;
@Field({ nullable: true })
description?: string;
@Field({ nullable: true })
creationDate?: Date;
@Field(type => [String], { nullable: true })
ingredients?: string[];
}