Map fields with @id decorator to String #173
Unanswered
georgekrax
asked this question in
Q&A
Replies: 1 comment 1 reply
-
It should automatically set
check your schema.prisma file if you want a guid its should be |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello everyone,
I would like to force the Prisma Client to generate
string
instead ofnumber
forInt
fields with @id. Is there a way to do it? I have a GraphQL API that treatsid
fields, with the corresponding string GraphQL scalar ID type, but TypeScript throws an error because the Client parses@id
tonumber
, and I do not want to replaceInt @id
withString @id
.Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions