My GraphQL schema uses a type called PointScalar
, which in Typescript would be defined as
export type PointScalar = {
coordinates: [number, number]
}
Without any modification, codegen declares PointScalar fields as Scalars['PointScalar']
, which in turn is any
.
I can add this to GraphQL:
config:
scalars:
PointScalar: PointScalar
which causes codegen to declare PointScalar as PointScalar, which is great ... but it doesn’t know what a PointScalar is.
How do I get codegen to add an import file or a type statement to the generated Typescript?