Kay Khan
06/15/2022, 8:11 PMbackend/
prisma/
schema.prisma
frontend/
I wanted to share types between the frontend and backend and because its a monorepo i can simply create shared
folder.
shared/
backend/
frontend/
if i want to reuse types that are generated by Prisma in the frontend whilst also using them in the backend, how might i do this?
Does this even make sense to do, "should" i move the prisma stuff over to the shared directory? Or should i really be creating a new seperate type for my api responses, even though in majority of the cases im simply returning a 1:1 of table columns and object fields.Arthur Kam
06/15/2022, 8:46 PMArthur Kam
06/15/2022, 8:47 PMArthur Kam
06/15/2022, 8:47 PMArthur Kam
06/15/2022, 8:48 PMKay Khan
06/15/2022, 8:48 PMArthur Kam
06/15/2022, 8:49 PMKay Khan
06/15/2022, 9:01 PMArthur Kam
06/15/2022, 9:06 PMJacob Martin
06/15/2022, 10:59 PMJacob Martin
06/15/2022, 11:01 PMJacob Martin
06/15/2022, 11:02 PMJacob Martin
06/15/2022, 11:05 PM