Entity variations

Is there a way to create variations of generated Prisma entity types?
(See docs: https://www.prisma.io/docs/orm/prisma-client/type-safety/operating-against-partial-structures-of-model-types#problem-using-variations-of-the-generated-model-type)

I have a
User
entity that has a Role entity relation and would like to create a Wasp query that fetches both user data and the user role, returning it as 1 merged response object.

Currently I'm manually defining the query response type but would love to learn if and how Prisma/Wasp can automatically take care of this for me by using the Prisma.validator approach as outlined in the docs.
This page documents various scenarios for using the generated types from the Prisma namespace
Was this page helpful?