Fluent API doesn't work as expected with client extensions
Hello, I am building a GraphQL API using NestJs and Prisma ORM. The Prisma client extension is used to manage the RLS policies as follows:
For all
ResolveFields
, I am leveraging the Fluent API to address the n+1 problem as described here.
However, I have observed that the Fluent API does not work as expected when using the client extension. When I comment out the client extension, the Fluent API behaves correctly.
I'm using @prisma/client: ^5.16.1
and prisma: ^5.16.1
. If you need further information or code snippets, let me know.
I hope someone can help me to find a solution.
Best regards.Query optimization | Prisma Documentation
How Prisma optimizes queries under the hood
4 Replies
Hi @LukasK
Client Extension doesn't currently support Fluent API as can be seen in this open issue
GitHub
Client extensions cannot support Fluent API · Issue #24653 · prisma...
Problem Putting this together because it's been mentioned a bunch of places but without the root issue being logged, see prisma/extension-read-replicas#12 and the Accelerate limitations page. W...
Hi @RaphaelEtim thank you for your fast reply.
Is there no way to use the Fluent API with the client extension?
Are there any updates on when this issue will be resolved?
Is there no way to use the Fluent API with the client extension?At the moment none officially but a user shared a workaround here
Are there any updates on when this issue will be resolved?I don't have an ETA at the moment for when it would be implemented.
Ok, thank you. Have a nice day!