Arturs
PPrisma
•Created by Arturs on 12/20/2024 in #help-and-questions
Prisma and Pothos integration using Raw SQL
I have a use case where a “prismaField” implements resolve which is based on Raw SQL because of full-text search usage. Let's say we are searching for users by name through full-text search.
The key problem starts when I use Prisma Pothos.js integration to solve N+1 through relations.
Code example from pothos.js prisma docs
Because based on their example, I need to pass down the query object to prisma, so the whole preloading would work out of the box. But how can I do it together with using raw SQL? Is there a util that converts prisma POJO to raw SQL that I could add as a fragment?
3 replies