Share Prisma types with frontend application?
Asked Answered
B

0

10

I've been looking at Prisma (Nodejs ORM) and have been wondering how to share the autogenerated TypeScript types with a front-end application. As far as I can tell, the Prisma client auto-generates all DTOs but offers no simple way to export or expose them to other parts of the stack?

Bassorilievo answered 12/5, 2021 at 13:52 Comment(1)
Are you creating a REST API or a GraphQL one ? On the second hypothesis you can use graphql-codegenTurbid

© 2022 - 2024 — McMap. All rights reserved.