P
Prisma5mo ago
Swyftey

Does Prisma support query cancellation via abort signals?

Hi, I asked AI the same question which they said answered "no" to, but I just want to be extra sure as I've seen "yes" somewhere else. I just want an ORM which has a query builder or query methods that have the option to pass an abort signal to cancel. So far AFAIK, Mongoose doesn't exactly support it, TypeORM doesn't seem to have it and I just want to know if Prisma does before switching. Thanks for any help
4 Replies
Prisma AI Help
Prisma AI Help5mo ago
You opted for speed from this bot. Let's conjure up an answer right now! I'm sorry, but Prisma does not currently support query cancellation via abort signals (such as AbortController or AbortSignal). There is an open feature request for this capability, and many users have expressed interest in being able to cancel long-running queries by passing an abort signal, similar to how the fetch API works. However, as of now, this feature is not implemented in Prisma, and there is no official API to pass an abort signal to query methods or transactions. The discussion and user feedback on this topic can be found here: Support query cancellation with AbortController / AbortSignal. If query cancellation is a critical requirement for your project, you may need to consider other solutions or monitor the progress of this feature request in Prisma's GitHub repository. Currently, neither Prisma, Mongoose, nor TypeORM offer built-in support for abort signals in their query APIs.
Swyftey
SwyfteyOP5mo ago
bruh
Prisma AI Help
Prisma AI Help5mo ago
✅ Great, thanks for letting us know that this solved your question!
Nurul
Nurul5mo ago
As bot suggested Prisma doesn't currently have support for AbortSignal. I would recommend giving a 👍 to the feature request so that our product team can prioritise it.

Did you find this page helpful?