Docs Transaction: Clear documentation on when a query (promise) can be created and used in a Txn
It is unclear of when a promise (query or mutation) can be created that we want included in a trasaction. When a promise is created, it is most comment for the I/O call to be made immediately. I'm hoping this is not the case for Prisma queries/mutation (just like GQL dataloaders).
There was an old issue discussing clarification back in V3, and the result was the Prisma doco being updated: https://github.com/prisma/prisma/discussions/13564#discussioncomment-9015929
Since then, and a few versions of the doco later, this info is missing.
So it would be nice to update the doco if this is still the case.
NOTE: in order for the promise to only fire when await/then, and not immediately, there would have to be a process.nextTick() (or a zero setTimeout)` - does that sound right?
This might be relevant here: https://www.prisma.io/docs/orm/reference/prisma-client-reference#prismapromise-behavior