Просмотр исходного кода

docs: Add enum naming convention to codegen guide

Michael Bromley 2 лет назад
Родитель
Сommit
191e17c09c
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      docs/docs/guides/storefront/codegen/index.mdx

+ 5 - 1
docs/docs/guides/storefront/codegen/index.mdx

@@ -54,7 +54,11 @@ const config: CodegenConfig = {
         scalars: {
         scalars: {
             // This tells codegen that the `Money` scalar is a number
             // This tells codegen that the `Money` scalar is a number
             Money: 'number',
             Money: 'number',
-        }
+        },
+        namingConvention: {
+            // This ensures generated enums do not conflict with the built-in types.
+            enumValues: 'keep',
+        },
       }
       }
       // highlight-end
       // highlight-end
     },
     },