Currently, the following GraphQL type
generates the following TypeScript type
export enum Color {
RED = "RED",
BLUE = "BLUE",
}
I would like to have the option to generate the following type instead:
export type Color = "RED" | "BLUE";
This definition provides the same safety, but is more efficient and works better with TypeScript structural typing.
Unrelated: consider generating const enum instead of enum.
Currently, the following GraphQL type
generates the following TypeScript type
I would like to have the option to generate the following type instead:
This definition provides the same safety, but is more efficient and works better with TypeScript structural typing.
Unrelated: consider generating
const enuminstead ofenum.