import { Field, ID, InputType, ObjectType } from 'type-graphql'; import { AggregateProduct } from '@/entities'; import { createConnectionType } from '../shared/pagination'; @ObjectType({ description: 'The connection type for AggregateProduct.', }) export class AggregateProductConnection extends createConnectionType( 'AggregateProduct', AggregateProduct ) {} @ObjectType({ description: 'Return type for the aggregateProduct query.', }) export class AggregateProductPayload { @Field(() => AggregateProduct, { nullable: false, description: 'The aggregate product.', }) aggregateProduct!: AggregateProduct; } @InputType({ description: 'Input type for the aggregateProduct query.', }) export class AggregateProductInput { @Field(() => ID, { nullable: true, description: 'The ID of the aggregate product.', }) id?: string; } export const DEFAULT_AGGREGATE_PRODUCT_INPUT = {}; @InputType() export class AggregateProductsInput { @Field(() => String, { nullable: true }) category!: string; } export const AGGREGATE_PRODUCTS_INPUT_DEFAULTS = {};