is there a way to generate all types for a client,...
# orm-help
d
is there a way to generate all types for a client, like graphql code generator has?
т
graphql nexus + paljs
r
Do you require it for the backend?
d
no, I was thinking of using the prisma model types/enums in the frontend so I dont need to manually copy paste them
r
You can directly import model types in the frontend via:
Copy code
import { User } from '@prisma/client'
Where
User
is the model name in
schema.prisma
.
d
the API and frontent are seperate project
how would that be possible
r
You can create an NPM package as shown here.