Hi, there ! Do you use the type-gen provided by n...
# orm-help
y
Hi, there ! Do you use the type-gen provided by nexus ? if I’m using the User type, this doesn’t seem intutive😭
Copy code
const user: NexusGenObjects["User"] = ...
How do you all user graphql type in typescript? create it manually ? I tried using graphql-code-generator, it was a pity that it did not check whether the resolver of the type field was implemented.
r
@YeonHoPark 👋 Where would you like to use the GraphQL type in TypeScript, on the frontend or the backend?
y
@Ryan will be used in the backend 😃
r
I think using
NexusGenObjects
should be fine. Are you facing any issues?
y
An enum type cannot be used as a value, it can only be used as a type annotation.
r
The enum type can be directly taken from Prisma’s type