Hello everyone! Completely new to DatoCMS after working with Strapi for a while, and I’m having major issues getting the typescript codegen things to work.
I’ve followed this guide but I’m not having any success.
For one, the graphql.config.yml file has a spelling error in the custom scalars:
“JsonField: unkown” should be unknown, right?
But when I fix that I get a type error on the StructuredText component:
"Type '{ __typename?: "StartpageModelContentField" | undefined; value: unknown; } | null | undefined' is not assignable to type 'Document | Node | StructuredText<Record, Record> | null | undefined'."
...
"Type 'unknown' is not assignable to type 'Document'"
In other similar issues on here, a suggested solution is to make the JsonField scalar have the type " StructuredText<Record, Record>", but StructuredText doesn’t get imported in to the generated.ts file, and if I import it manually I’m getting the error “Generic type ‘Record’ requires 2 type argument(s).ts(2314)”
Any help would be much appreciated, it’s definitely possible I’m doing something else completely wrong.
