-
Notifications
You must be signed in to change notification settings - Fork 310
Closed
Labels
Description
Description
Some TypeScript type names are derived from the GraphQL scalar name in such a way that they conflict with TypeScript syntax. I have one example here; the scalar named bigint
causes tsc errors.
Reproduction Steps/Repo Link
Use a schema like
scalar bigint
type Query {
b: bigint
}
Run tsc --noEdit
, it will return these errors:
.../modules/scalar.ts:16:13 - error TS2457: Type alias name cannot be 'bigint'.
16 export type bigint = $$Utilities.Schema.Scalar.ScalarCodecless<"bigint">;
~~~~~~
.../modules/schema.ts:254:20 - error TS2724: '".../modules/schema".Schema' has no exported member named 'bigint'. Did you mean '$bigint'?
254 bigint: Schema.bigint;
~~~~~~
(actually the issue on line 254 looks a little different, a mistake in how this value is escaped - not sure if worth reporting separately)