Hi,
I've managed to get the extension working successfully in JS using the sample code shared in .md.
I have an issue running the same example using the 'require' syntax.
const { PrismaClient } = require('@prisma/client'); const prismaRandom = require('prisma-extension-random'); // const prisma = new PrismaClient(); const prisma = new PrismaClient().$extends(prismaRandom);
The errors that I'm getting are:
TypeError: prisma.newQuote.findRandom is not a function
TypeError: prisma.newQuote.findManyRandom is not a function
I've tried multiple other forms to workaround it but assume this is an issue upstream / in the module itself and it exports the prismaRandom interface?
Thanks!
Hi,
I've managed to get the extension working successfully in JS using the sample code shared in .md.
I have an issue running the same example using the 'require' syntax.
const { PrismaClient } = require('@prisma/client'); const prismaRandom = require('prisma-extension-random'); // const prisma = new PrismaClient(); const prisma = new PrismaClient().$extends(prismaRandom);The errors that I'm getting are:
TypeError: prisma.newQuote.findRandom is not a function
TypeError: prisma.newQuote.findManyRandom is not a function
I've tried multiple other forms to workaround it but assume this is an issue upstream / in the module itself and it exports the prismaRandom interface?
Thanks!