prisma / extension-read-replicas

Prisma Client Extension to add read replica support to your Prisma Client
Apache License 2.0
104 stars 7 forks source link

Unable to add options for replica client constructors #20

Closed casey-chow closed 4 months ago

casey-chow commented 1 year ago

I need to add logging to our read replica clients, but the client does not allow me to adjust constructor queries.

https://github.com/prisma/extension-read-replicas/blob/3c1a7127b4c80a3352893d8bea71c73898d8d391/src/ReplicaManager.ts#L23C26-L25

janpio commented 1 year ago

Very good point. Would you expect the replica Clients to inherit the configuration from the main Client, or do you want to customize it somehow when activating the extension?

casey-chow commented 1 year ago

Personally I'd expect it to inherit the configuration, but it's easy to argue it's better to just allow user-level customization.

yicrotkd commented 1 year ago

I've submitted a pull request to address this issue. I would appreciate it if you could review and confirm. Thank you!

erawk commented 11 months ago

Nice work @yicrotkd . Any chance we could get #30 reviewed, @SevInf or @janpio ?

pciruzzi commented 10 months ago

@erawk @SevInf @janpio Hey, I've came across this issue too. Do you intend to release the PR soon? 🙂