prisma / extension-read-replicas

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

Unable to add options for replica client constructors #20

Open casey-chow opened 9 months ago

casey-chow commented 9 months 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 9 months 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 9 months 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 7 months 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 7 months ago

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

pciruzzi commented 5 months ago

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