import { Field, InputType, ObjectType } from 'type-graphql'; import { Lead } from '../../entities'; @InputType({ description: 'Input for addLead mutation.', }) export class AddLeadInput { @Field(() => String, { nullable: false, description: 'The email for the lead.', }) email!: string; } @ObjectType({ description: 'Return type for addLead mutation.', }) export class AddLeadResponse { @Field(() => Lead, { description: 'The lead that was added.' }) lead!: Lead; @Field(() => Boolean, { nullable: false, description: 'Whether or not the lead was added.', }) success!: boolean; }