James L
05/03/2022, 10:26 AMconst account = await prisma.user.findFirst({
where: {
_reqId: 'example-here',
id: 1,
},
});
then
const reqIdMiddleware = async (params, next) => {
if (params?.args?.where['_reqId']) {
console.log('_reqId was found!', params.args.where['_reqId']);
delete params.args.where['_reqId'];
}
return next(params)
};
prisma.$use(reqIdMiddleware);