generate union types instead of enums
This commit is contained in:
@@ -44,10 +44,7 @@ describe("gqlSchemaToTypes", () => {
|
||||
Float: { input: number; output: number; }
|
||||
};
|
||||
|
||||
export enum Test {
|
||||
TestA = 'test-a',
|
||||
TestB = 'Test_B'
|
||||
}
|
||||
export type Test = | 'test-a' | 'Test_B';
|
||||
|
||||
declare module '@medusajs/framework/types' {
|
||||
interface RemoteQueryEntryPoints {
|
||||
|
||||
@@ -157,6 +157,7 @@ export async function gqlSchemaToTypes({
|
||||
{
|
||||
typescript: {
|
||||
enumValues: getEnumValues(schema),
|
||||
enumsAsTypes: true,
|
||||
},
|
||||
},
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user