zenstack
zenstack copied to clipboard
[Feature Request] add prisma output to APIHandlerBase handleRequest return value
at packages/server/src/types there is the following type:
/**
* API response
*/
export type Response = {
status: number;
body: unknown;
};
I thought maybe to add also modelReturnValue/primsaOutput/modelOutput as part of the Response, in that way, when customizing RestApi/RPC handler, we could also make $transaction for example and use the state of the prisma output.
So it would require to add the new field to type Response and then add to handleRequest of APIHandlerBase's instances in the return value also the output of the prisma operation, but it should be very easy to do so.