import { Field, InputType, ObjectType } from 'type-graphql'; import { Product, Page } from '../../entities'; @InputType({ description: 'Input type for matchingProduct query', }) export class ProductInput { @Field(() => String, { description: 'url to check for matching product' }) url!: string; } @ObjectType({ description: 'Return type for matchingProduct query', }) export class ProductPayload { @Field(() => Product, { description: 'The product that matches.' }) product!: Product; @Field(() => Page, { description: 'The page that matches if it exists.', nullable: true, }) page?: Page; }