Skip to content

Commit

Permalink
Add emitRedundantTypesInfo generator option
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalLytek committed Jan 18, 2023
1 parent 39bba26 commit 36113be
Show file tree
Hide file tree
Showing 167 changed files with 595 additions and 331 deletions.
20 changes: 20 additions & 0 deletions docs/advanced/emit-redundant-types-info.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Emit redundant types info
sidebar_label: Redundant types
sidebar_position: 14
---

By default, `typegraphql-prisma` tries to minimize the generated LOC by omitting the redundant types info.

However, if you need to have all the types info generated, you can use the `emitRedundantTypesInfo` generator option:

```prisma {3}
generator typegraphql {
provider = "typegraphql-prisma"
emitRedundantTypesInfo = true
}
```

By using this option, the generated code will have all the types info emitted in a form of decorator payload (`@Args(_returns => AggregateCategoryArgs)`), even if it's redundant and not necessary.

However, thanks to this, you can use any other compiler that does not supports type metadata, like `esbuild`, so you're not limited to using standard Typescript compiler with `emitDecoratorMetadata` option enabled.
1 change: 1 addition & 0 deletions experiments/postgres/prisma/generated/client/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ generator typegraphql {
customPrismaImportPath = "../client"
contextPrismaKey = "prismaClient"
useSimpleInputs = true
emitRedundantTypesInfo = true
}

// Role enum comment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class AggregateCategoryResolver {
@TypeGraphQL.Query(_returns => AggregateCategory, {
nullable: false
})
async aggregateCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: AggregateCategoryArgs): Promise<AggregateCategory> {
async aggregateCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => AggregateCategoryArgs) args: AggregateCategoryArgs): Promise<AggregateCategory> {
return getPrismaFromContext(ctx).category.aggregate({
...args,
...transformInfoIntoPrismaArgs(info),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Query(_returns => AggregateCategory, {
nullable: false
})
async aggregateCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: AggregateCategoryArgs): Promise<AggregateCategory> {
async aggregateCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => AggregateCategoryArgs) args: AggregateCategoryArgs): Promise<AggregateCategory> {
return getPrismaFromContext(ctx).category.aggregate({
...args,
...transformInfoIntoPrismaArgs(info),
Expand All @@ -35,7 +35,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Mutation(_returns => AffectedRowsOutput, {
nullable: false
})
async createManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyCategoryArgs): Promise<AffectedRowsOutput> {
async createManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => CreateManyCategoryArgs) args: CreateManyCategoryArgs): Promise<AffectedRowsOutput> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.createMany({
...args,
Expand All @@ -46,7 +46,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Mutation(_returns => Category, {
nullable: false
})
async createOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateOneCategoryArgs): Promise<Category> {
async createOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => CreateOneCategoryArgs) args: CreateOneCategoryArgs): Promise<Category> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.create({
...args,
Expand All @@ -57,7 +57,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Mutation(_returns => AffectedRowsOutput, {
nullable: false
})
async deleteManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: DeleteManyCategoryArgs): Promise<AffectedRowsOutput> {
async deleteManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => DeleteManyCategoryArgs) args: DeleteManyCategoryArgs): Promise<AffectedRowsOutput> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.deleteMany({
...args,
Expand All @@ -68,7 +68,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Mutation(_returns => Category, {
nullable: true
})
async deleteOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: DeleteOneCategoryArgs): Promise<Category | null> {
async deleteOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => DeleteOneCategoryArgs) args: DeleteOneCategoryArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.delete({
...args,
Expand All @@ -79,7 +79,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Query(_returns => Category, {
nullable: true
})
async findFirstCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindFirstCategoryArgs): Promise<Category | null> {
async findFirstCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindFirstCategoryArgs) args: FindFirstCategoryArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findFirst({
...args,
Expand All @@ -90,7 +90,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Query(_returns => Category, {
nullable: true
})
async findFirstCategoryOrThrow(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindFirstCategoryOrThrowArgs): Promise<Category | null> {
async findFirstCategoryOrThrow(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindFirstCategoryOrThrowArgs) args: FindFirstCategoryOrThrowArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findFirstOrThrow({
...args,
Expand All @@ -101,7 +101,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Query(_returns => [Category], {
nullable: false
})
async categories(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindManyCategoryArgs): Promise<Category[]> {
async categories(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindManyCategoryArgs) args: FindManyCategoryArgs): Promise<Category[]> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findMany({
...args,
Expand All @@ -112,7 +112,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Query(_returns => Category, {
nullable: true
})
async category(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindUniqueCategoryArgs): Promise<Category | null> {
async category(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindUniqueCategoryArgs) args: FindUniqueCategoryArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findUnique({
...args,
Expand All @@ -123,7 +123,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Query(_returns => Category, {
nullable: true
})
async getCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindUniqueCategoryOrThrowArgs): Promise<Category | null> {
async getCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindUniqueCategoryOrThrowArgs) args: FindUniqueCategoryOrThrowArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findUniqueOrThrow({
...args,
Expand All @@ -134,7 +134,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Query(_returns => [CategoryGroupBy], {
nullable: false
})
async groupByCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: GroupByCategoryArgs): Promise<CategoryGroupBy[]> {
async groupByCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => GroupByCategoryArgs) args: GroupByCategoryArgs): Promise<CategoryGroupBy[]> {
const { _count, _avg, _sum, _min, _max } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.groupBy({
...args,
Expand All @@ -147,7 +147,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Mutation(_returns => AffectedRowsOutput, {
nullable: false
})
async updateManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: UpdateManyCategoryArgs): Promise<AffectedRowsOutput> {
async updateManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => UpdateManyCategoryArgs) args: UpdateManyCategoryArgs): Promise<AffectedRowsOutput> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.updateMany({
...args,
Expand All @@ -158,7 +158,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Mutation(_returns => Category, {
nullable: true
})
async updateOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: UpdateOneCategoryArgs): Promise<Category | null> {
async updateOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => UpdateOneCategoryArgs) args: UpdateOneCategoryArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.update({
...args,
Expand All @@ -169,7 +169,7 @@ export class CategoryCrudResolver {
@TypeGraphQL.Mutation(_returns => Category, {
nullable: false
})
async upsertOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: UpsertOneCategoryArgs): Promise<Category> {
async upsertOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => UpsertOneCategoryArgs) args: UpsertOneCategoryArgs): Promise<Category> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.upsert({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class CreateManyCategoryResolver {
@TypeGraphQL.Mutation(_returns => AffectedRowsOutput, {
nullable: false
})
async createManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateManyCategoryArgs): Promise<AffectedRowsOutput> {
async createManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => CreateManyCategoryArgs) args: CreateManyCategoryArgs): Promise<AffectedRowsOutput> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.createMany({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class CreateOneCategoryResolver {
@TypeGraphQL.Mutation(_returns => Category, {
nullable: false
})
async createOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: CreateOneCategoryArgs): Promise<Category> {
async createOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => CreateOneCategoryArgs) args: CreateOneCategoryArgs): Promise<Category> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.create({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class DeleteManyCategoryResolver {
@TypeGraphQL.Mutation(_returns => AffectedRowsOutput, {
nullable: false
})
async deleteManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: DeleteManyCategoryArgs): Promise<AffectedRowsOutput> {
async deleteManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => DeleteManyCategoryArgs) args: DeleteManyCategoryArgs): Promise<AffectedRowsOutput> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.deleteMany({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class DeleteOneCategoryResolver {
@TypeGraphQL.Mutation(_returns => Category, {
nullable: true
})
async deleteOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: DeleteOneCategoryArgs): Promise<Category | null> {
async deleteOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => DeleteOneCategoryArgs) args: DeleteOneCategoryArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.delete({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class FindFirstCategoryOrThrowResolver {
@TypeGraphQL.Query(_returns => Category, {
nullable: true
})
async findFirstCategoryOrThrow(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindFirstCategoryOrThrowArgs): Promise<Category | null> {
async findFirstCategoryOrThrow(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindFirstCategoryOrThrowArgs) args: FindFirstCategoryOrThrowArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findFirstOrThrow({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class FindFirstCategoryResolver {
@TypeGraphQL.Query(_returns => Category, {
nullable: true
})
async findFirstCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindFirstCategoryArgs): Promise<Category | null> {
async findFirstCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindFirstCategoryArgs) args: FindFirstCategoryArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findFirst({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class FindManyCategoryResolver {
@TypeGraphQL.Query(_returns => [Category], {
nullable: false
})
async categories(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindManyCategoryArgs): Promise<Category[]> {
async categories(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindManyCategoryArgs) args: FindManyCategoryArgs): Promise<Category[]> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findMany({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class FindUniqueCategoryOrThrowResolver {
@TypeGraphQL.Query(_returns => Category, {
nullable: true
})
async getCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindUniqueCategoryOrThrowArgs): Promise<Category | null> {
async getCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindUniqueCategoryOrThrowArgs) args: FindUniqueCategoryOrThrowArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findUniqueOrThrow({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class FindUniqueCategoryResolver {
@TypeGraphQL.Query(_returns => Category, {
nullable: true
})
async category(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: FindUniqueCategoryArgs): Promise<Category | null> {
async category(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => FindUniqueCategoryArgs) args: FindUniqueCategoryArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.findUnique({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class GroupByCategoryResolver {
@TypeGraphQL.Query(_returns => [CategoryGroupBy], {
nullable: false
})
async groupByCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: GroupByCategoryArgs): Promise<CategoryGroupBy[]> {
async groupByCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => GroupByCategoryArgs) args: GroupByCategoryArgs): Promise<CategoryGroupBy[]> {
const { _count, _avg, _sum, _min, _max } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.groupBy({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class UpdateManyCategoryResolver {
@TypeGraphQL.Mutation(_returns => AffectedRowsOutput, {
nullable: false
})
async updateManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: UpdateManyCategoryArgs): Promise<AffectedRowsOutput> {
async updateManyCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => UpdateManyCategoryArgs) args: UpdateManyCategoryArgs): Promise<AffectedRowsOutput> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.updateMany({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class UpdateOneCategoryResolver {
@TypeGraphQL.Mutation(_returns => Category, {
nullable: true
})
async updateOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: UpdateOneCategoryArgs): Promise<Category | null> {
async updateOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => UpdateOneCategoryArgs) args: UpdateOneCategoryArgs): Promise<Category | null> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.update({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export class UpsertOneCategoryResolver {
@TypeGraphQL.Mutation(_returns => Category, {
nullable: false
})
async upsertOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: UpsertOneCategoryArgs): Promise<Category> {
async upsertOneCategory(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => UpsertOneCategoryArgs) args: UpsertOneCategoryArgs): Promise<Category> {
const { _count } = transformInfoIntoPrismaArgs(info);
return getPrismaFromContext(ctx).category.upsert({
...args,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class AggregateCreatorResolver {
@TypeGraphQL.Query(_returns => AggregateCreator, {
nullable: false
})
async aggregateCreator(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args() args: AggregateCreatorArgs): Promise<AggregateCreator> {
async aggregateCreator(@TypeGraphQL.Ctx() ctx: any, @TypeGraphQL.Info() info: GraphQLResolveInfo, @TypeGraphQL.Args(_returns => AggregateCreatorArgs) args: AggregateCreatorArgs): Promise<AggregateCreator> {
return getPrismaFromContext(ctx).creator.aggregate({
...args,
...transformInfoIntoPrismaArgs(info),
Expand Down
Loading

0 comments on commit 36113be

Please sign in to comment.