prisma.update returns promise but doesn't do anything (most of the time)
As described in the title, prisma.update does not reliably trigger an update in the database.
This is the gist of my code:
Additionally, I have enabled prisma query logs in production:
["query", "error", "warn"]
Any ideas on what's going on? Please let me know if there's more information I should provide.3 Replies
I've been doing research but still have not solved this.
Prisma does lazy evaluation: https://github.com/prisma/docs/issues/800
But that still does not explain the behaviour.
I have tried every possible way of triggering the evaluation. e.g:
e.g. without await or void (just in case that magically made a difference)
GitHub
Clarify when Prisma queries are run (PrismaPromise behavior) · Issu...
@Sytten brought up a good point in Slack that we don't really talk about when queries are executed. In this example: import { User } from '@prisma/client' export default async (app: App...
I can't make sense of this .. it really seems like it's just random
Just had one record update 5 hours after the call.