You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description and expected behavior
Optional json field creates an error out of the box due to a different optional type check.
Screenshots
n/a
Environment (please complete the following information):
ZenStack version: 2.8.1
Prisma version: "^5.21.1"
Database type: Postgresql
Zod: "^3.23.8"
Additional context
type JSONContent {
type String
text String?
}
Types of property 'contentJSON' are incompatible.
Type '{ type: string; text?: string | null | undefined; } | null | undefined' is not assignable to type 'JSONContent | null | undefined'.
Type '{ type: string; text?: string | null | undefined; }' is not assignable to type 'JSONContent'.
Types of property 'text' are incompatible.
Type 'string | null | undefined' is not assignable to type 'string | undefined'.
Type 'null' is not assignable to type 'string | undefined'.ts-plugin(2322)
index-fixed.d.ts(11664, 9): The expected type comes from property 'data' which is declared here on type 'ArticleCreateArgs<DefaultArgs>'
The text was updated successfully, but these errors were encountered:
Hi @AlekseiAQ , could you show me your mutation code? It seems in the mutation input the text field can be null (while ZenStack generated field is string | undefined). Is this intentional?
Description and expected behavior
Optional json field creates an error out of the box due to a different optional type check.
Screenshots
n/a
Environment (please complete the following information):
2.8.1
"^5.21.1"
Postgresql
"^3.23.8"
Additional context
The text was updated successfully, but these errors were encountered: