Generate query functions by using the --sql flag on prisma generate: Import the query function from @prisma/client/sql … … and call it inside the new $queryRawTyped function to get fully typed results 😎 If your SQL query has arguments, they are provided to the query function passed to $queryRawTyped The Prisma Client API together with TypedSQL provides the best experience for both CRUD operations