import { Field, InputType, ObjectType } from 'type-graphql'; import { Hunt } from '../../entities'; @InputType({ description: 'Input for the addHunt mutation.', }) export class AddHuntInput { @Field(() => String, { nullable: false, description: 'The url to be hunted.', }) url!: string; @Field(() => String, { nullable: false, description: 'The email of the user submitting the hunt.', }) email!: string; } @ObjectType({ description: 'Return type for the addHunt mutation.', }) export class MutationResponse { @Field(() => Hunt, { description: 'The hunt that was created.' }) hunt!: Hunt; @Field(() => Boolean, { nullable: false, description: 'Whether or not the hunt was created successfully', }) success!: boolean; }