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

Support Fluent API in read operations #36

Open casey-chow opened 1 week ago

casey-chow commented 1 week ago

Closes #12 with the solution approach described in https://github.com/prisma/extension-read-replicas/issues/12#issuecomment-2059456680. I further productionized it to make sure it handled arrays correctly, and added some tests to make sure of that fact.

This, of course, is a workaround at best and a terrible hack at worst. That said, the lack of support for Fluent API is significantly hampering adoption of client extensions, and this behavior is backed with an integration test, so we will get warning if Prisma Client breaks this behavior. I would much prefer resolution of https://github.com/prisma/prisma/issues/24653 in the long term.