Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add the prisma client import option #196

Merged
merged 2 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 11 additions & 10 deletions @generated/article/aggregate-article.output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ import { ArticleMaxAggregate } from './article-max-aggregate.output';

@ObjectType()
export class AggregateArticle {
@Field(() => ArticleCountAggregate, { nullable: true })
_count?: ArticleCountAggregate;

@Field(() => ArticleAvgAggregate, { nullable: true })
_avg?: ArticleAvgAggregate;
@Field(() => ArticleCountAggregate, {nullable:true})
_count?: ArticleCountAggregate;

@Field(() => ArticleSumAggregate, { nullable: true })
_sum?: ArticleSumAggregate;
@Field(() => ArticleAvgAggregate, {nullable:true})
_avg?: ArticleAvgAggregate;

@Field(() => ArticleMinAggregate, { nullable: true })
_min?: ArticleMinAggregate;
@Field(() => ArticleSumAggregate, {nullable:true})
_sum?: ArticleSumAggregate;

@Field(() => ArticleMaxAggregate, { nullable: true })
_max?: ArticleMaxAggregate;
@Field(() => ArticleMinAggregate, {nullable:true})
_min?: ArticleMinAggregate;

@Field(() => ArticleMaxAggregate, {nullable:true})
_max?: ArticleMaxAggregate;
}
45 changes: 23 additions & 22 deletions @generated/article/article-aggregate.args.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { ArgsType } from '@nestjs/graphql';
import { ArticleWhereInput } from './article-where.input';
import { Type } from 'class-transformer';
import { ArticleOrderByWithRelationAndSearchRelevanceInput } from './article-order-by-with-relation-and-search-relevance.input';
import { Prisma } from '@prisma/client';
import { Prisma } from '../../prisma-client';
import { ArticleWhereUniqueInput } from './article-where-unique.input';
import { Int } from '@nestjs/graphql';
import { ArticleCountAggregateInput } from './article-count-aggregate.input';
Expand All @@ -14,34 +14,35 @@ import { ArticleMaxAggregateInput } from './article-max-aggregate.input';

@ArgsType()
export class ArticleAggregateArgs {
@Field(() => ArticleWhereInput, { nullable: true })
@Type(() => ArticleWhereInput)
where?: ArticleWhereInput;

@Field(() => [ArticleOrderByWithRelationAndSearchRelevanceInput], { nullable: true })
orderBy?: Array<ArticleOrderByWithRelationAndSearchRelevanceInput>;
@Field(() => ArticleWhereInput, {nullable:true})
@Type(() => ArticleWhereInput)
where?: ArticleWhereInput;

@Field(() => ArticleWhereUniqueInput, { nullable: true })
cursor?: Prisma.AtLeast<ArticleWhereUniqueInput, 'id' | 'slug'>;
@Field(() => [ArticleOrderByWithRelationAndSearchRelevanceInput], {nullable:true})
orderBy?: Array<ArticleOrderByWithRelationAndSearchRelevanceInput>;

@Field(() => Int, { nullable: true })
take?: number;
@Field(() => ArticleWhereUniqueInput, {nullable:true})
cursor?: Prisma.AtLeast<ArticleWhereUniqueInput, 'id' | 'slug'>;

@Field(() => Int, { nullable: true })
skip?: number;
@Field(() => Int, {nullable:true})
take?: number;

@Field(() => ArticleCountAggregateInput, { nullable: true })
_count?: ArticleCountAggregateInput;
@Field(() => Int, {nullable:true})
skip?: number;

@Field(() => ArticleAvgAggregateInput, { nullable: true })
_avg?: ArticleAvgAggregateInput;
@Field(() => ArticleCountAggregateInput, {nullable:true})
_count?: ArticleCountAggregateInput;

@Field(() => ArticleSumAggregateInput, { nullable: true })
_sum?: ArticleSumAggregateInput;
@Field(() => ArticleAvgAggregateInput, {nullable:true})
_avg?: ArticleAvgAggregateInput;

@Field(() => ArticleMinAggregateInput, { nullable: true })
_min?: ArticleMinAggregateInput;
@Field(() => ArticleSumAggregateInput, {nullable:true})
_sum?: ArticleSumAggregateInput;

@Field(() => ArticleMaxAggregateInput, { nullable: true })
_max?: ArticleMaxAggregateInput;
@Field(() => ArticleMinAggregateInput, {nullable:true})
_min?: ArticleMinAggregateInput;

@Field(() => ArticleMaxAggregateInput, {nullable:true})
_max?: ArticleMaxAggregateInput;
}
5 changes: 3 additions & 2 deletions @generated/article/article-avg-aggregate.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { InputType } from '@nestjs/graphql';

@InputType()
export class ArticleAvgAggregateInput {
@Field(() => Boolean, { nullable: true })
favoritesCount?: true;

@Field(() => Boolean, {nullable:true})
favoritesCount?: true;
}
5 changes: 3 additions & 2 deletions @generated/article/article-avg-aggregate.output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Float } from '@nestjs/graphql';

@ObjectType()
export class ArticleAvgAggregate {
@Field(() => Float, { nullable: true })
favoritesCount?: number;

@Field(() => Float, {nullable:true})
favoritesCount?: number;
}
5 changes: 3 additions & 2 deletions @generated/article/article-avg-order-by-aggregate.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { SortOrder } from '../prisma/sort-order.enum';

@InputType()
export class ArticleAvgOrderByAggregateInput {
@Field(() => SortOrder, { nullable: true })
favoritesCount?: keyof typeof SortOrder;

@Field(() => SortOrder, {nullable:true})
favoritesCount?: keyof typeof SortOrder;
}
45 changes: 23 additions & 22 deletions @generated/article/article-count-aggregate.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,36 +3,37 @@ import { InputType } from '@nestjs/graphql';

@InputType()
export class ArticleCountAggregateInput {
@Field(() => Boolean, { nullable: true })
id?: true;

@Field(() => Boolean, { nullable: true })
slug?: true;
@Field(() => Boolean, {nullable:true})
id?: true;

@Field(() => Boolean, { nullable: true })
title?: true;
@Field(() => Boolean, {nullable:true})
slug?: true;

@Field(() => Boolean, { nullable: true })
description?: true;
@Field(() => Boolean, {nullable:true})
title?: true;

@Field(() => Boolean, { nullable: true })
body?: true;
@Field(() => Boolean, {nullable:true})
description?: true;

@Field(() => Boolean, { nullable: true })
createdAt?: true;
@Field(() => Boolean, {nullable:true})
body?: true;

@Field(() => Boolean, { nullable: true })
updatedAt?: true;
@Field(() => Boolean, {nullable:true})
createdAt?: true;

@Field(() => Boolean, { nullable: true })
favoritesCount?: true;
@Field(() => Boolean, {nullable:true})
updatedAt?: true;

@Field(() => Boolean, { nullable: true })
authorId?: true;
@Field(() => Boolean, {nullable:true})
favoritesCount?: true;

@Field(() => Boolean, { nullable: true })
active?: true;
@Field(() => Boolean, {nullable:true})
authorId?: true;

@Field(() => Boolean, { nullable: true })
_all?: true;
@Field(() => Boolean, {nullable:true})
active?: true;

@Field(() => Boolean, {nullable:true})
_all?: true;
}
45 changes: 23 additions & 22 deletions @generated/article/article-count-aggregate.output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,37 @@ import { Int } from '@nestjs/graphql';

@ObjectType()
export class ArticleCountAggregate {
@Field(() => Int, { nullable: false })
id!: number;

@Field(() => Int, { nullable: false })
slug!: number;
@Field(() => Int, {nullable:false})
id!: number;

@Field(() => Int, { nullable: false })
title!: number;
@Field(() => Int, {nullable:false})
slug!: number;

@Field(() => Int, { nullable: false })
description!: number;
@Field(() => Int, {nullable:false})
title!: number;

@Field(() => Int, { nullable: false })
body!: number;
@Field(() => Int, {nullable:false})
description!: number;

@Field(() => Int, { nullable: false })
createdAt!: number;
@Field(() => Int, {nullable:false})
body!: number;

@Field(() => Int, { nullable: false })
updatedAt!: number;
@Field(() => Int, {nullable:false})
createdAt!: number;

@Field(() => Int, { nullable: false })
favoritesCount!: number;
@Field(() => Int, {nullable:false})
updatedAt!: number;

@Field(() => Int, { nullable: false })
authorId!: number;
@Field(() => Int, {nullable:false})
favoritesCount!: number;

@Field(() => Int, { nullable: false })
active!: number;
@Field(() => Int, {nullable:false})
authorId!: number;

@Field(() => Int, { nullable: false })
_all!: number;
@Field(() => Int, {nullable:false})
active!: number;

@Field(() => Int, {nullable:false})
_all!: number;
}
41 changes: 21 additions & 20 deletions @generated/article/article-count-order-by-aggregate.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,34 @@ import { SortOrder } from '../prisma/sort-order.enum';

@InputType()
export class ArticleCountOrderByAggregateInput {
@Field(() => SortOrder, { nullable: true })
id?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
slug?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
id?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
title?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
slug?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
description?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
title?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
body?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
description?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
createdAt?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
body?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
updatedAt?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
createdAt?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
favoritesCount?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
updatedAt?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
authorId?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
favoritesCount?: keyof typeof SortOrder;

@Field(() => SortOrder, { nullable: true })
active?: keyof typeof SortOrder;
@Field(() => SortOrder, {nullable:true})
authorId?: keyof typeof SortOrder;

@Field(() => SortOrder, {nullable:true})
active?: keyof typeof SortOrder;
}
13 changes: 7 additions & 6 deletions @generated/article/article-count.output.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ import { Int } from '@nestjs/graphql';

@ObjectType()
export class ArticleCount {
@Field(() => Int, { nullable: false })
tags?: number;

@Field(() => Int, { nullable: false })
favoritedBy?: number;
@Field(() => Int, {nullable:false})
tags?: number;

@Field(() => Int, { nullable: false })
comments?: number;
@Field(() => Int, {nullable:false})
favoritedBy?: number;

@Field(() => Int, {nullable:false})
comments?: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ import { Type } from 'class-transformer';

@InputType()
export class ArticleCreateManyAuthorInputEnvelope {
@Field(() => [ArticleCreateManyAuthorInput], { nullable: false })
@Type(() => ArticleCreateManyAuthorInput)
data!: Array<ArticleCreateManyAuthorInput>;

@Field(() => Boolean, { nullable: true })
skipDuplicates?: boolean;
@Field(() => [ArticleCreateManyAuthorInput], {nullable:false})
@Type(() => ArticleCreateManyAuthorInput)
data!: Array<ArticleCreateManyAuthorInput>;

@Field(() => Boolean, {nullable:true})
skipDuplicates?: boolean;
}
37 changes: 19 additions & 18 deletions @generated/article/article-create-many-author.input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,31 @@ import { Int } from '@nestjs/graphql';

@InputType()
export class ArticleCreateManyAuthorInput {
@Field(() => String, { nullable: true })
id?: string;

@Field(() => String, { nullable: false })
slug!: string;
@Field(() => String, {nullable:true})
id?: string;

@Field(() => String, { nullable: false })
title!: string;
@Field(() => String, {nullable:false})
slug!: string;

@Field(() => String, { nullable: false })
description!: string;
@Field(() => String, {nullable:false})
title!: string;

@Field(() => String, { nullable: false })
body!: string;
@Field(() => String, {nullable:false})
description!: string;

@HideField()
createdAt?: Date | string;
@Field(() => String, {nullable:false})
body!: string;

@Field(() => Date, { nullable: true })
updatedAt?: Date | string;
@HideField()
createdAt?: Date | string;

@Field(() => Int, { nullable: true })
favoritesCount?: number;
@Field(() => Date, {nullable:true})
updatedAt?: Date | string;

@Field(() => Boolean, { nullable: true })
active?: boolean;
@Field(() => Int, {nullable:true})
favoritesCount?: number;

@Field(() => Boolean, {nullable:true})
active?: boolean;
}
Loading
Loading