-
Notifications
You must be signed in to change notification settings - Fork 13
Update package to work with prisma 6 #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
PR is here: #42. You could test it and upvote it if it works for you. :-) |
From prisma 6.2+ it's not working at all. TypeError: Cannot read properties of undefined (reading 'findFirst')
at Array.$allOperations (/backend/node_modules/@prisma/extension-read-replicas/dist/index.js:146:34)
at /backend/node_modules/@prisma/client-postgresql/runtime/library.js:31:9170
at i (/backend/node_modules/@prisma/client-postgresql/runtime/library.js:121:1016)
at PrismaPromise.then (/backend/node_modules/@prisma/client-postgresql/runtime/library.js:121:1091) |
Can confirm the current 0.4.0 version is not working on 6.2.1
|
Same here, it doesn't work with Prisma ^6.2.1
|
For anyone running into issues with >= Prisma 6.2, you can get around it by initializing PrismaClients with the constructor and passing them into the extension as replicas, rather than return client
.$extends(
readReplicas({
replicas: (readonlyUrls ?? []).map((url) => new PrismaClient({ datasourceUrl: url })),
})
); |
Hey everyone! We released a new version of read-replicas extension - https://www.npmjs.com/package/@prisma/extension-read-replicas Can you please upgrade to the latest version and confirm if the issue is resolved? |
@nurul3101 I confirm the problem was solved. I have been using it on high-traffic production for 2 days already. |
Update package to work with prisma 6
The text was updated successfully, but these errors were encountered: