We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc2526e commit 628e73cCopy full SHA for 628e73c
packages/graphql/lib/type-factories/register-enum-type.factory.ts
@@ -25,6 +25,12 @@ export interface EnumOptions<T extends object = any> {
25
* A map of options for the values of the enum.
26
*/
27
valuesMap?: EnumMetadataValuesMap<T>;
28
+
29
+ /**
30
+ * Automatically map enum to UPPER_CASE in the schema.
31
+ * Defaults to `false`
32
+ */
33
+ mapToUppercase?: boolean;
34
}
35
36
/**
@@ -41,6 +47,7 @@ export function registerEnumType<T extends object = any>(
41
47
name: options.name,
42
48
description: options.description,
43
49
valuesMap: options.valuesMap || {},
50
+ mapToUppercase: options.mapToUppercase || false,
44
51
}),
45
52
);
46
53
0 commit comments