TypeError: Type ‘JsonValue’ is not assignable to type ‘InputJsonValue’. How can I properly narrow the
Prisma.JsonValue
type to
Prisma.InputJsonValue
?
Richard
04/29/2022, 11:47 AM
I get this type error a lot for:
graphql-codegen <> prisma
Is there some docs about how to make the types work between these tools?
Richard
04/29/2022, 11:48 AM
This GitHub issue suggests to type cast, which isn’t ideal obviously.
n
Nurul
05/05/2022, 12:59 PM
Hey Richard 👋
Thanks for the feedback, we could improve this in our documentation, I’ll pass on this feedback.
As of now, the function that you listed in the next message looks good to me! 👍