Using prisma.$queryRaw, I was able to write a basic query that returned the data I needed. However, I also needed the query to filter and order the data.
Let’s update our project with the correct TypeScript types; then, let’s look at how to use our updated types to contribute to the Definitely Typed project.
Customizing the openapi-typescript generator involves an upfront investment. But with this in place, you can have more confidence in your branded types.