Next.js Discord

Discord Forum

sharing prisma generated types on my nest backend with my nextjs frontend?

Unanswered
Gg posted this in #help-forum
Open in Discord
GgOP
huge noob here but i was wondering if its possible to have my prisma client be generated inside an nx library, and then make my frontend and backend share the generated types? my frontend is nextjs so i would assume yes, since its not uncommon to instantiate prisma in nextjs applications to begin with?

Or would it be preferrable to make simplified types for the frontend? like, duplicate them

0 Replies