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

Is `readOperations` correct for `$queryRaw` and `$queryRawUnsafe`?

Open notsoluckycharm opened this issue 1 year ago • 2 comments

I think a minor change is required on the readOperations list. If you run a $queryRaw it will not match, as inserting a log statement yields the operation to contain the dollar sign. So these will not use the replica.

'$queryRaw', '$queryRawUnsafe',

I ask because making this change (and I would have PR'd it) loses the return types that the top level client gives you.

TypeError: Cannot destructure property 'prisma__type' of 'object null' as it is null.

So it would seem raw query on the replicas is currently unsupported.

notsoluckycharm avatar Sep 19 '23 01:09 notsoluckycharm