You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
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?
The text was updated successfully, but these errors were encountered:
richard-stafflink
changed the title
Transaction: clear document on when a query (promise) can be created and used in a Txn
Docs Transaction: Clear documentation on when a query (promise) can be created and used in a Txn
Apr 5, 2024
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: prisma/prisma#13564 (reply in thread)
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?The text was updated successfully, but these errors were encountered: