diff --git a/apps/api/src/app/graphql/resolvers/prisma/User.ts b/apps/api/src/app/graphql/resolvers/prisma/User.ts index ef64768cc..e4426718b 100644 --- a/apps/api/src/app/graphql/resolvers/prisma/User.ts +++ b/apps/api/src/app/graphql/resolvers/prisma/User.ts @@ -1,6 +1,5 @@ import { UseGuards } from '@nestjs/common'; import { Args, Info, Mutation, Parent, Query, ResolveField, Resolver } from '@nestjs/graphql'; -import type { NonNullableFields } from '@zen/common'; import { RolesGuard } from '@zen/nest-auth'; import { GraphQLResolveInfo } from 'graphql'; import gql from 'graphql-tag'; @@ -47,18 +46,12 @@ export class UserResolver { } @Query() - async findUniqueUser( - @Args() args: NonNullableFields, - @Info() info: GraphQLResolveInfo - ) { + async findUniqueUser(@Args() args: FindUniqueUserArgs, @Info() info: GraphQLResolveInfo) { return this.prisma.user.findUnique(this.prismaSelect.getArgs(info, args)); } @Query() - async findFirstUser( - @Args() args: NonNullableFields, - @Info() info: GraphQLResolveInfo - ) { + async findFirstUser(@Args() args: FindFirstUserArgs, @Info() info: GraphQLResolveInfo) { return this.prisma.user.findFirst(this.prismaSelect.getArgs(info, args)); } @@ -69,7 +62,7 @@ export class UserResolver { @Query() async findManyUserCount(@Args() args: FindManyUserArgs, @Info() info: GraphQLResolveInfo) { - return this.prisma.user.count(this.prismaSelect.getArgs(info, args)); + return this.prisma.user.count(this.prismaSelect.getArgs(info, args) as any); } @Query() @@ -83,16 +76,13 @@ export class UserResolver { } @Mutation() - async updateOneUser( - @Args() args: NonNullableFields, - @Info() info: GraphQLResolveInfo - ) { + async updateOneUser(@Args() args: UpdateOneUserArgs, @Info() info: GraphQLResolveInfo) { return this.prisma.user.update(this.prismaSelect.getArgs(info, args)); } @Mutation() - async updateManyUser(@Args() args: UpdateManyUserArgs, @Info() info: GraphQLResolveInfo) { - return this.prisma.user.updateMany(this.prismaSelect.getArgs(info, args)); + async deleteOneUser(@Args() args: DeleteOneUserArgs, @Info() info: GraphQLResolveInfo) { + return this.prisma.user.delete(this.prismaSelect.getArgs(info, args)); } @Mutation() @@ -101,15 +91,12 @@ export class UserResolver { } @Mutation() - async deleteOneUser( - @Args() args: NonNullableFields, - @Info() info: GraphQLResolveInfo - ) { - return this.prisma.user.delete(this.prismaSelect.getArgs(info, args)); + async deleteManyUser(@Args() args: DeleteManyUserArgs, @Info() info: GraphQLResolveInfo) { + return this.prisma.user.deleteMany(this.prismaSelect.getArgs(info, args)); } @Mutation() - async deleteManyUser(@Args() args: DeleteManyUserArgs, @Info() info: GraphQLResolveInfo) { - return this.prisma.user.deleteMany(this.prismaSelect.getArgs(info, args)); + async updateManyUser(@Args() args: UpdateManyUserArgs, @Info() info: GraphQLResolveInfo) { + return this.prisma.user.updateMany(this.prismaSelect.getArgs(info, args)); } } diff --git a/libs/graphql/src/lib/apollo-angular.ts b/libs/graphql/src/lib/apollo-angular.ts index 96ca3b3da..82449a81d 100644 --- a/libs/graphql/src/lib/apollo-angular.ts +++ b/libs/graphql/src/lib/apollo-angular.ts @@ -914,13 +914,12 @@ export type UpdateOneUserVariables = Exact<{ export type UpdateOneUser = { __typename?: 'Mutation', updateOneUser: { __typename?: 'User', id: string, username?: string | null, email: string } }; -export type UpdateManyUserVariables = Exact<{ - data: UserUpdateManyMutationInput; - where: UserWhereInput; +export type DeleteOneUserVariables = Exact<{ + where: UserWhereUniqueInput; }>; -export type UpdateManyUser = { __typename?: 'Mutation', updateManyUser?: { __typename?: 'BatchPayload', count: number } | null }; +export type DeleteOneUser = { __typename?: 'Mutation', deleteOneUser?: { __typename?: 'User', id: string } | null }; export type UpsertOneUserVariables = Exact<{ where: UserWhereUniqueInput; @@ -931,19 +930,20 @@ export type UpsertOneUserVariables = Exact<{ export type UpsertOneUser = { __typename?: 'Mutation', upsertOneUser?: { __typename?: 'User', id: string, username?: string | null, email: string } | null }; -export type DeleteOneUserVariables = Exact<{ - where: UserWhereUniqueInput; +export type DeleteManyUserVariables = Exact<{ + where: UserWhereInput; }>; -export type DeleteOneUser = { __typename?: 'Mutation', deleteOneUser?: { __typename?: 'User', id: string } | null }; +export type DeleteManyUser = { __typename?: 'Mutation', deleteManyUser?: { __typename?: 'BatchPayload', count: number } | null }; -export type DeleteManyUserVariables = Exact<{ +export type UpdateManyUserVariables = Exact<{ + data: UserUpdateManyMutationInput; where: UserWhereInput; }>; -export type DeleteManyUser = { __typename?: 'Mutation', deleteManyUser?: { __typename?: 'BatchPayload', count: number } | null }; +export type UpdateManyUser = { __typename?: 'Mutation', updateManyUser?: { __typename?: 'BatchPayload', count: number } | null }; export type SampleSubscriptionVariables = Exact<{ [key: string]: never; }>; @@ -1254,10 +1254,10 @@ export const UpdateOneUserDocument = /*#__PURE__*/ gql` super(apollo); } } -export const UpdateManyUserDocument = /*#__PURE__*/ gql` - mutation UpdateManyUser($data: UserUpdateManyMutationInput!, $where: UserWhereInput!) { - updateManyUser(data: $data, where: $where) { - count +export const DeleteOneUserDocument = /*#__PURE__*/ gql` + mutation DeleteOneUser($where: UserWhereUniqueInput!) { + deleteOneUser(where: $where) { + id } } `; @@ -1265,8 +1265,8 @@ export const UpdateManyUserDocument = /*#__PURE__*/ gql` @Injectable({ providedIn: ZenGraphQLModule }) - export class UpdateManyUserGQL extends Apollo.Mutation { - override document = UpdateManyUserDocument; + export class DeleteOneUserGQL extends Apollo.Mutation { + override document = DeleteOneUserDocument; constructor(apollo: Apollo.Apollo) { super(apollo); @@ -1290,10 +1290,10 @@ export const UpsertOneUserDocument = /*#__PURE__*/ gql` super(apollo); } } -export const DeleteOneUserDocument = /*#__PURE__*/ gql` - mutation DeleteOneUser($where: UserWhereUniqueInput!) { - deleteOneUser(where: $where) { - id +export const DeleteManyUserDocument = /*#__PURE__*/ gql` + mutation DeleteManyUser($where: UserWhereInput!) { + deleteManyUser(where: $where) { + count } } `; @@ -1301,16 +1301,16 @@ export const DeleteOneUserDocument = /*#__PURE__*/ gql` @Injectable({ providedIn: ZenGraphQLModule }) - export class DeleteOneUserGQL extends Apollo.Mutation { - override document = DeleteOneUserDocument; + export class DeleteManyUserGQL extends Apollo.Mutation { + override document = DeleteManyUserDocument; constructor(apollo: Apollo.Apollo) { super(apollo); } } -export const DeleteManyUserDocument = /*#__PURE__*/ gql` - mutation DeleteManyUser($where: UserWhereInput!) { - deleteManyUser(where: $where) { +export const UpdateManyUserDocument = /*#__PURE__*/ gql` + mutation UpdateManyUser($data: UserUpdateManyMutationInput!, $where: UserWhereInput!) { + updateManyUser(data: $data, where: $where) { count } } @@ -1319,8 +1319,8 @@ export const DeleteManyUserDocument = /*#__PURE__*/ gql` @Injectable({ providedIn: ZenGraphQLModule }) - export class DeleteManyUserGQL extends Apollo.Mutation { - override document = DeleteManyUserDocument; + export class UpdateManyUserGQL extends Apollo.Mutation { + override document = UpdateManyUserDocument; constructor(apollo: Apollo.Apollo) { super(apollo); diff --git a/libs/graphql/src/lib/prisma/User.gql.ts b/libs/graphql/src/lib/prisma/User.gql.ts index 711b51840..fa6745344 100644 --- a/libs/graphql/src/lib/prisma/User.gql.ts +++ b/libs/graphql/src/lib/prisma/User.gql.ts @@ -79,9 +79,9 @@ export default gql` } } - mutation UpdateManyUser($data: UserUpdateManyMutationInput!, $where: UserWhereInput!) { - updateManyUser(data: $data, where: $where) { - count + mutation DeleteOneUser($where: UserWhereUniqueInput!) { + deleteOneUser(where: $where) { + id } } @@ -95,14 +95,14 @@ export default gql` } } - mutation DeleteOneUser($where: UserWhereUniqueInput!) { - deleteOneUser(where: $where) { - id + mutation DeleteManyUser($where: UserWhereInput!) { + deleteManyUser(where: $where) { + count } } - mutation DeleteManyUser($where: UserWhereInput!) { - deleteManyUser(where: $where) { + mutation UpdateManyUser($data: UserUpdateManyMutationInput!, $where: UserWhereInput!) { + updateManyUser(data: $data, where: $where) { count } } diff --git a/package.json b/package.json index 234bc8b71..306d25f8e 100644 --- a/package.json +++ b/package.json @@ -33,7 +33,7 @@ "@nestjs/platform-express": "^10.2.8", "@nestjs/throttler": "^5.0.1", "@paljs/plugins": "6.0.7", - "@prisma/client": "~5.4.2", + "@prisma/client": "~5.5.2", "class-transformer": "^0.5.1", "class-validator": "^0.14.0", "dotenv": "^16.3.1", @@ -50,7 +50,7 @@ "passport": "^0.6.0", "passport-google-oauth20": "^2.0.0", "passport-jwt": "^4.0.1", - "prisma": "~5.4.2", + "prisma": "~5.5.2", "reflect-metadata": "^0.1.13", "rxjs": "~7.8.1", "tslib": "^2.6.2" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b16029c3d..e446720dd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ dependencies: version: 6.5.0 '@casl/prisma': specifier: ~1.4.1 - version: 1.4.1(@casl/ability@6.5.0)(@prisma/client@5.4.2) + version: 1.4.1(@casl/ability@6.5.0)(@prisma/client@5.5.2) '@graphql-tools/merge': specifier: ^9.0.0 version: 9.0.0(graphql@16.8.1) @@ -46,10 +46,10 @@ dependencies: version: 5.0.1(@nestjs/common@10.2.8)(@nestjs/core@10.2.8)(reflect-metadata@0.1.13) '@paljs/plugins': specifier: 6.0.7 - version: 6.0.7(@prisma/client@5.4.2)(graphql@16.8.1) + version: 6.0.7(@prisma/client@5.5.2)(graphql@16.8.1) '@prisma/client': - specifier: ~5.4.2 - version: 5.4.2(prisma@5.4.2) + specifier: ~5.5.2 + version: 5.5.2(prisma@5.5.2) class-transformer: specifier: ^0.5.1 version: 0.5.1 @@ -99,8 +99,8 @@ dependencies: specifier: ^4.0.1 version: 4.0.1 prisma: - specifier: ~5.4.2 - version: 5.4.2 + specifier: ~5.5.2 + version: 5.5.2 reflect-metadata: specifier: ^0.1.13 version: 0.1.13 @@ -3639,14 +3639,14 @@ packages: tslib: 2.6.2 dev: true - /@casl/prisma@1.4.1(@casl/ability@6.5.0)(@prisma/client@5.4.2): + /@casl/prisma@1.4.1(@casl/ability@6.5.0)(@prisma/client@5.5.2): resolution: {integrity: sha512-WTFcWhYnoEc8fRHMzlqd3MU6WXOtT1cfoHmxSyB14gVeRHWvOyWdVaGxueLySgBOb08kIiZdjOBYNJRTzlAqBA==} peerDependencies: '@casl/ability': ^5.3.0 || ^6.0.0 '@prisma/client': ^2.14.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 dependencies: '@casl/ability': 6.5.0 - '@prisma/client': 5.4.2(prisma@5.4.2) + '@prisma/client': 5.5.2(prisma@5.5.2) '@ucast/core': 1.10.2 '@ucast/js': 3.0.3 dev: false @@ -6036,7 +6036,7 @@ packages: react: '>=16' dependencies: '@types/mdx': 2.0.9 - '@types/react': 18.2.34 + '@types/react': 18.2.35 react: 18.2.0 dev: true @@ -7456,7 +7456,7 @@ packages: - supports-color dev: true - /@paljs/plugins@6.0.7(@prisma/client@5.4.2)(graphql@16.8.1): + /@paljs/plugins@6.0.7(@prisma/client@5.5.2)(graphql@16.8.1): resolution: {integrity: sha512-8mQmSfto3qt8q9BwpoDw0hYj4IOmvKNy0FxWQQTujYEFLtasHLQVrQsO9R2HFFR0NZbQCiANyy4ctR6uBW/C4w==} peerDependencies: '@prisma/client': ^5 @@ -7464,7 +7464,7 @@ packages: dependencies: '@paljs/types': 6.0.7 '@paljs/utils': 6.0.7 - '@prisma/client': 5.4.2(prisma@5.4.2) + '@prisma/client': 5.5.2(prisma@5.5.2) graphql: 16.8.1 graphql-parse-resolve-info: 4.13.0(graphql@16.8.1) graphql-tag: 2.12.6(graphql@16.8.1) @@ -7543,8 +7543,8 @@ packages: resolution: {integrity: sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==} dev: true - /@prisma/client@5.4.2(prisma@5.4.2): - resolution: {integrity: sha512-2xsPaz4EaMKj1WS9iW6MlPhmbqtBsXAOeVttSePp8vTFTtvzh2hZbDgswwBdSCgPzmmwF+tLB259QzggvCmJqA==} + /@prisma/client@5.5.2(prisma@5.5.2): + resolution: {integrity: sha512-54XkqR8M+fxbzYqe+bIXimYnkkcGqgOh0dn0yWtIk6CQT4IUCAvNFNcQZwk2KqaLU+/1PHTSWrcHtx4XjluR5w==} engines: {node: '>=16.13'} requiresBuild: true peerDependencies: @@ -7553,8 +7553,8 @@ packages: prisma: optional: true dependencies: - '@prisma/engines-version': 5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574 - prisma: 5.4.2 + '@prisma/engines-version': 5.5.1-1.aebc046ce8b88ebbcb45efe31cbe7d06fd6abc0a + prisma: 5.5.2 dev: false /@prisma/debug@5.5.2: @@ -7566,13 +7566,8 @@ packages: transitivePeerDependencies: - supports-color - /@prisma/engines-version@5.4.1-2.ac9d7041ed77bcc8a8dbd2ab6616b39013829574: - resolution: {integrity: sha512-wvupDL4AA1vf4TQNANg7kR7y98ITqPsk6aacfBxZKtrJKRIsWjURHkZCGcQliHdqCiW/hGreO6d6ZuSv9MhdAA==} - dev: false - - /@prisma/engines@5.4.2: - resolution: {integrity: sha512-fqeucJ3LH0e1eyFdT0zRx+oETLancu5+n4lhiYECyEz6H2RDskPJHJYHkVc0LhkU4Uv7fuEnppKU3nVKNzMh8g==} - requiresBuild: true + /@prisma/engines-version@5.5.1-1.aebc046ce8b88ebbcb45efe31cbe7d06fd6abc0a: + resolution: {integrity: sha512-O+qHFnZvAyOFk1tUco2/VdiqS0ym42a3+6CYLScllmnpbyiTplgyLt2rK/B9BTjYkSHjrgMhkG47S0oqzdIckA==} dev: false /@prisma/engines@5.5.2: @@ -9793,8 +9788,8 @@ packages: csstype: 3.1.2 dev: true - /@types/react@18.2.34: - resolution: {integrity: sha512-U6eW/alrRk37FU/MS2RYMjx0Va2JGIVXELTODaTIYgvWGCV4Y4TfTUzG8DdmpDNIT0Xpj/R7GfyHOJJrDttcvg==} + /@types/react@18.2.35: + resolution: {integrity: sha512-LG3xpFZ++rTndV+/XFyX5vUP7NI9yxyk+MQvBDq+CVs8I9DLSc3Ymwb1Vmw5YDoeNeHN4PDZa3HylMKJYT9PNQ==} dependencies: '@types/prop-types': 15.7.9 '@types/scheduler': 0.16.5 @@ -19276,13 +19271,13 @@ packages: uuid: 9.0.1 dev: false - /prisma@5.4.2: - resolution: {integrity: sha512-GDMZwZy7mysB2oXU+angQqJ90iaPFdD0rHaZNkn+dio5NRkGLmMqmXs31//tg/qXT3iB0cTQwnGGQNuirhSTZg==} + /prisma@5.5.2: + resolution: {integrity: sha512-WQtG6fevOL053yoPl6dbHV+IWgKo25IRN4/pwAGqcWmg7CrtoCzvbDbN9fXUc7QS2KK0LimHIqLsaCOX/vHl8w==} engines: {node: '>=16.13'} hasBin: true requiresBuild: true dependencies: - '@prisma/engines': 5.4.2 + '@prisma/engines': 5.5.2 dev: false /proc-log@3.0.0: diff --git a/tools/templates/client-queries.ts b/tools/templates/client-queries.ts index ee620e4cf..9fa871749 100644 --- a/tools/templates/client-queries.ts +++ b/tools/templates/client-queries.ts @@ -80,9 +80,9 @@ export default gql\` } } - mutation UpdateMany${name}($data: ${name}UpdateManyMutationInput!, $where: ${name}WhereInput!) { - updateMany${name}(data: $data, where: $where) { - count + mutation DeleteOne${name}($where: ${name}WhereUniqueInput!) { + deleteOne${name}(where: $where) { + id } } @@ -96,18 +96,19 @@ export default gql\` } } - mutation DeleteOne${name}($where: ${name}WhereUniqueInput!) { - deleteOne${name}(where: $where) { - id + mutation DeleteMany${name}($where: ${name}WhereInput!) { + deleteMany${name}(where: $where) { + count } } - mutation DeleteMany${name}($where: ${name}WhereInput!) { - deleteMany${name}(where: $where) { + mutation UpdateMany${name}($data: ${name}UpdateManyMutationInput!, $where: ${name}WhereInput!) { + updateMany${name}(data: $data, where: $where) { count } } \${${name}Fields} -\`;\n`; +\`; +`; } diff --git a/tools/templates/graphql-resolvers-abac.ts b/tools/templates/graphql-resolvers-abac.ts index d716d9dbc..bff1a7107 100644 --- a/tools/templates/graphql-resolvers-abac.ts +++ b/tools/templates/graphql-resolvers-abac.ts @@ -93,7 +93,7 @@ export class ${name}Resolver { @Query() @CaslPolicy(ability => ability.can('read', '${name}')) async findMany${name}Count(@Args() args: FindMany${name}Args, @Info() info: GraphQLResolveInfo) { - return this.prisma.${lowercase(name)}.count(this.prismaSelect.getArgs(info, args)); + return this.prisma.${lowercase(name)}.count(this.prismaSelect.getArgs(info, args) as any); } @Query() @@ -135,20 +135,18 @@ export class ${name}Resolver { } @Mutation() - @CaslPolicy(ability => ability.can('update', '${name}')) - async updateMany${name}( - @Args() args: UpdateMany${name}Args, + @CaslPolicy(ability => ability.can('delete', '${name}')) + async deleteOne${name}( + @Args() args: DeleteOne${name}Args, @Info() info: GraphQLResolveInfo, @CaslAbility() ability: AppAbility ) { - const records = await this.prisma.${lowercase(name)}.findMany({ + const record = await this.prisma.${lowercase(name)}.findUnique({ where: args.where, select: this.authFields.${name}, }); - for (const record of records) { - if (ability.cannot('update', subject('${name}', record as ${name}))) throw new ForbiddenException(); - } - return this.prisma.${lowercase(name)}.updateMany(this.prismaSelect.getArgs(info, args)); + if (ability.cannot('delete', subject('${name}', record as ${name}))) throw new ForbiddenException(); + return this.prisma.${lowercase(name)}.delete(this.prismaSelect.getArgs(info, args)); } @Mutation() @@ -178,23 +176,25 @@ export class ${name}Resolver { @Mutation() @CaslPolicy(ability => ability.can('delete', '${name}')) - async deleteOne${name}( - @Args() args: DeleteOne${name}Args, + async deleteMany${name}( + @Args() args: DeleteMany${name}Args, @Info() info: GraphQLResolveInfo, @CaslAbility() ability: AppAbility ) { - const record = await this.prisma.${lowercase(name)}.findUnique({ + const records = await this.prisma.${lowercase(name)}.findMany({ where: args.where, select: this.authFields.${name}, }); - if (ability.cannot('delete', subject('${name}', record as ${name}))) throw new ForbiddenException(); - return this.prisma.${lowercase(name)}.delete(this.prismaSelect.getArgs(info, args)); + for (const record of records) { + if (ability.cannot('delete', subject('${name}', record as ${name}))) throw new ForbiddenException(); + } + return this.prisma.${lowercase(name)}.deleteMany(this.prismaSelect.getArgs(info, args)); } @Mutation() - @CaslPolicy(ability => ability.can('delete', '${name}')) - async deleteMany${name}( - @Args() args: DeleteMany${name}Args, + @CaslPolicy(ability => ability.can('update', '${name}')) + async updateMany${name}( + @Args() args: UpdateMany${name}Args, @Info() info: GraphQLResolveInfo, @CaslAbility() ability: AppAbility ) { @@ -203,9 +203,9 @@ export class ${name}Resolver { select: this.authFields.${name}, }); for (const record of records) { - if (ability.cannot('delete', subject('${name}', record as ${name}))) throw new ForbiddenException(); + if (ability.cannot('update', subject('${name}', record as ${name}))) throw new ForbiddenException(); } - return this.prisma.${lowercase(name)}.deleteMany(this.prismaSelect.getArgs(info, args)); + return this.prisma.${lowercase(name)}.updateMany(this.prismaSelect.getArgs(info, args)); } } `; diff --git a/tools/templates/graphql-resolvers-rbac.ts b/tools/templates/graphql-resolvers-rbac.ts index bdb791449..7f6261359 100644 --- a/tools/templates/graphql-resolvers-rbac.ts +++ b/tools/templates/graphql-resolvers-rbac.ts @@ -58,7 +58,7 @@ export class ${name}Resolver { @Query() async findMany${name}Count(@Args() args: FindMany${name}Args, @Info() info: GraphQLResolveInfo) { - return this.prisma.${lowercase(name)}.count(this.prismaSelect.getArgs(info, args)); + return this.prisma.${lowercase(name)}.count(this.prismaSelect.getArgs(info, args) as any); } @Query() @@ -77,8 +77,8 @@ export class ${name}Resolver { } @Mutation() - async updateMany${name}(@Args() args: UpdateMany${name}Args, @Info() info: GraphQLResolveInfo) { - return this.prisma.${lowercase(name)}.updateMany(this.prismaSelect.getArgs(info, args)); + async deleteOne${name}(@Args() args: DeleteOne${name}Args, @Info() info: GraphQLResolveInfo) { + return this.prisma.${lowercase(name)}.delete(this.prismaSelect.getArgs(info, args)); } @Mutation() @@ -87,13 +87,13 @@ export class ${name}Resolver { } @Mutation() - async deleteOne${name}(@Args() args: DeleteOne${name}Args, @Info() info: GraphQLResolveInfo) { - return this.prisma.${lowercase(name)}.delete(this.prismaSelect.getArgs(info, args)); + async deleteMany${name}(@Args() args: DeleteMany${name}Args, @Info() info: GraphQLResolveInfo) { + return this.prisma.${lowercase(name)}.deleteMany(this.prismaSelect.getArgs(info, args)); } @Mutation() - async deleteMany${name}(@Args() args: DeleteMany${name}Args, @Info() info: GraphQLResolveInfo) { - return this.prisma.${lowercase(name)}.deleteMany(this.prismaSelect.getArgs(info, args)); + async updateMany${name}(@Args() args: UpdateMany${name}Args, @Info() info: GraphQLResolveInfo) { + return this.prisma.${lowercase(name)}.updateMany(this.prismaSelect.getArgs(info, args)); } } `;