Hi guys, I’m using prisma generated types in my ap...
# orm-help
w
Hi guys, I’m using prisma generated types in my api code like this
Copy code
import { User } from '../../generated/prisma';
My front-end uses some typescript as well and I’m wondering if I could (and should) use these types on the front-end as well?
c
what client are you using for the frontend?
if you’re using apollo, then apollo codegen might be what you’re looking for https://www.apollographql.com/docs/react/features/developer-tooling.html#codegen
importing types from prisma might be problematic since you will have to query for every field to match the defined type which I think ruins the whole point of graphql
w
I see, thanks! I'm using apollo so that seems perfect