I have a react application that utilizes Prisma backend. Prisma backend is in it's own separate library with models generated from the database. The intention is that the entire application can be within one repository with both the front end and backend using typescript. The models that the React application uses are the same models Prisma generated.
In Prisma when I do relations such as the 'Include' statement. I can't seem to access that property in my react application. Is there a way for me to access the full type including that of the 'Include' in my React application?
get full type on prisma client talks about this but my problem is where I define the full type including the relation i.e. 'UsersWithCars'. I don't want to create a new model within my React application because that just means there are two sets of model I have to manage, the Prisma and the React.
I've attempted to replicate get full type on prisma client within the Prisma backend but I cannot access the newly defined type within my React front end