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.
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.