This should do it:

type BatchPayload {
  count: Int!
}

type Mutation {
  removeAllMovies: BatchPayload
}

And the resolver is correct so no changes there.

Answer from Ryan on Stack Overflow
🌐
Prisma
prisma.io › home › prisma client api › prisma client api › prisma client api
Prisma Client API | Prisma Documentation
[ { "id": 0, "name": "Sonali", ... "alex@prisma.io", "profileViews": 0 } ] updateMany updates a batch of existing database records in bulk and returns the number of updated records. export type BatchPayload = { count: number; }; ...
🌐
SabinTheDev
sabinadams.hashnode.dev › basic-crud-operations-in-prisma
Prisma and TypeScript CRUD Basics - Sabin Adams
June 21, 2024 - What we get back is a Prisma.BatchPayload object containing the count of records that were deleted.
Discussions

Prisma2: BatchPayload type not generated
scope/projectingExposing Prisma Models in the GQL APIExposing Prisma Models in the GQL APItype/bugSomething is not working the way it shouldSomething is not working the way it should ... It seems that the BatchPayload type is not automatically generated for Prisma2/nexus projects. More on github.com
🌐 github.com
2
August 6, 2019
prisma - Schema mutation for deleteMany({}) - Stack Overflow
Could you explain how it works or reference a documentation? What's BatchPayload? More on stackoverflow.com
🌐 stackoverflow.com
error TS2694: Namespace '".../node_modules/.prisma/client/index"' has no exported member 'BatchPayload'
When I use deleteMany, updateMany. Prisma support type named BatchPayload but it has no exported. More on github.com
🌐 github.com
6
November 30, 2020
$transaction, $executeRaw, and PrismaPromise Type Woes
calling deleteMany returns a Prisma.BatchPayload which is just a wrapper around a number More on github.com
🌐 github.com
4
1
🌐
Medium
medium.com › @ivanspoljaric22 › mastering-bulk-inserts-in-prisma-best-practices-for-performance-integrity-2ba531f86f74
Mastering Bulk Inserts in Prisma: Best Practices for Performance & Integrity | by Ivan Spoljaric | Medium
February 14, 2025 - createMany<T extends OrganisationCreateManyArgs>(args? : SelectSubset<T, OrganisationCreateManyArgs<ExtArgs>>) : Prisma.PrismaPromise<BatchPayload> type BatchPayload = { count: number }
🌐
GitHub
github.com › prisma-labs › nexus-prisma › issues › 341
Prisma2: BatchPayload type not generated · Issue #341 · graphql-nexus/nexus-plugin-prisma
August 6, 2019 - It seems that the BatchPayload type is not automatically generated for Prisma2/nexus projects. In Prisma1, it was automatically generated as type BatchPayload { count: Long! }
Author   graphql-nexus
🌐
GitHub
github.com › prisma › prisma › issues › 4405
error TS2694: Namespace '".../node_modules/.prisma/ ...
November 30, 2020 - When I use deleteMany, updateMany. Prisma support type named BatchPayload but it has no exported.
Author   prisma
🌐
GitHub
github.com › prisma › prisma1 › blob › master › docs › 1.34 › prisma-client › basic-data-access › writing-data-GO-go08.mdx
prisma1/docs/1.34/prisma-client/basic-data-access/writing-data-GO-go08.mdx at master · prisma/prisma1
September 2, 2022 - prisma.BatchPayload{Count:1} Delete all posts that were created before 2018: <Code languages={["Go", "Result"]}> christmas := "2019-12-24" deletePostsCount, err := client.DeleteManyPosts(&prisma.PostWhereInput{ CreatedAtGt: &christmas, }).Exec(ctx) 42 · Nested object writes let you modify multiple database records across relations in a single transaction.
Author   prisma
Find elsewhere
🌐
Answer Overflow
answeroverflow.com › m › 1214928946991202324
what is Prisma.BatchPayload? - Theo's Typesafe Cult
March 6, 2024 - const insertIntoTradesRes = await ctx.db.trade.createMany({ data: trades }); const insertedTradeIds = insertIntoTradesRes.map(trade => trade.id); await ctx.db.importSession.create({ data: { name: 'MT4 Import', importedFrom: 'MT4', createdBy: { connect: { id: ctx.session.user.id } }, trades: { connect: insertedTradeIds }, }, }); I'm trying to make an insertion into the trade table and then use the ids generated to connect those trades created in another table. however I'm unable to as the return type from createMany is Prisma.BatchPayload Can anyone help me achieve this without manually creating and assigning uuids
🌐
Go Packages
pkg.go.dev › github.com › prisma › prisma-client-lib-go
prisma package - github.com/prisma/prisma-client-lib-go - Go Packages
Package prisma provides runtime functions for generated Prisma clients. Users should not have to interact with it directly. type BatchPayload · type BatchPayloadExec · func (exec *BatchPayloadExec) Exec(ctx context.Context) (BatchPayload, error) type Client ·
🌐
Typegraphql
prisma.typegraphql.com › advanced › simple resolvers
Simple resolvers (performance) | TypeGraphQL Prisma
generator typegraphql { provider = "typegraphql-prisma" simpleResolvers = true } It will generate then all the output type and model type classes with simpleResolvers: true option of @ObjectType decorator, which can improve performance of underlying field resolvers, e.g.: @TypeGraphQL.ObjectType({ description: undefined, simpleResolvers: true, }) export class BatchPayload { @TypeGraphQL.Field(_type => TypeGraphQL.Int, { nullable: false, description: undefined, }) count!: number; }
🌐
GitHub
github.com › graphql-nexus › nexus › issues › 741
nexus-plugin-prisma: Nexus BatchPayload Type Generation Mismatch · Issue #741 · graphql-nexus/nexus
December 18, 2020 - export namespace Prisma { /** * Batch Payload for updateMany & deleteMany */ export type BatchPayload = { count: number } }
Author   graphql-nexus
🌐
GitHub
github.com › prisma › specs › blob › master › prisma-client-js › README.md
specs/prisma-client-js/README.md at master · prisma/specs
October 21, 2020 - prisma.post.create([args]): Promise<Post> prisma.post.delete([args]): Promise<Post> prisma.post.deleteMany([args]): Promise<BatchPayload> prisma.post.update([args]): Promise<Post> prisma.post.updateMany([args]): Promise<BatchPayload> prisma.post.updsert([args]): Promise<Post> Creates a single record and returns the created record, including any auto-generated fields such as a id field with a default value.
Author   prisma
🌐
GitHub
github.com › prisma › prisma › issues › 4998
Efficiently create many records · Issue #4998 · prisma/prisma
July 29, 2019 - For small amounts of data, a simple batch API might be sufficient, as the database can handle all the operations in a short time. This could either be exposed through operations similar to our nested create API as described below, or through a new Batch API as described in prisma/prisma-client-js#667.
Author   prisma
🌐
Prisma Client Python
prisma-client-py.readthedocs.io › en › stable › reference › batching
Batching Queries - Prisma Client Python
In some cases you may want to insert a lot of rows at once or create two non-related models at the same time but only create the records if they all are created sucessfully. Prisma Client Python supports this by batching write queries.
🌐
GitHub
github.com › prisma › prisma1 › blob › master › docs › 1.27 › prisma-graphql-api › reference › mutations-qwe2.mdx
prisma1/docs/1.27/prisma-graphql-api/reference/mutations-qwe2.mdx at master · prisma/prisma1
September 2, 2022 - deleteManyUsers(where: UserWhereInput!): BatchPayload! } For every type in your datamodel, six mutation are generated. Taking above the above User type as an example, these mutations are: ... To inspect all the available operations of your Prisma API in detail, you can read the Prisma GraphQL schema of your Prisma service.
Author   prisma
🌐
Prisma
prisma.io › blog › using-graphql-nexus-with-a-database-pmyl3660ncst
How to Use GraphQL Nexus with a Database | Prisma
February 12, 2019 - It generates the building blocks of a full-blown GraphQL CRUD API for your Prisma models, e.g. for a User model it includes: Queries · user(...): User!: Fetches a single record · users(...): [User!]!: Fetches a list of records · usersConnection(...): UserConnection!: Relay connections & aggregations · Mutations · createUser(...): User!: Creates a new record · updateUser(...): User: Updates a record · deleteUser(...): User: Deletes a record · updatesManyUsers(...): BatchPayload!: Updates many records in bulk ·
🌐
Medium
chaitanyakadu.medium.com › prisma-transactions-and-batch-queries-d0fb932b7fed
Prisma Transactions and Batch Queries | by Chaitanya Kadu | Medium
March 5, 2025 - Now, consider another case where money is deducted from your wallet, but the server crashes before it is added to the receiver’s wallet. The sender would lose money. Prisma’s atomicity ensures that either both operations succeed or both fail, avoiding such partial failures.