extension-read-replicas icon indicating copy to clipboard operation
extension-read-replicas copied to clipboard

Unable to add options for replica client constructors

Open casey-chow opened this issue 2 years ago • 5 comments

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

casey-chow avatar Oct 06 '23 18:10 casey-chow

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?

janpio avatar Oct 06 '23 19:10 janpio

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

casey-chow avatar Oct 06 '23 20:10 casey-chow

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

yicrotkd avatar Nov 14 '23 12:11 yicrotkd

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

erawk avatar Dec 07 '23 00:12 erawk

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

pciruzzi avatar Jan 30 '24 18:01 pciruzzi