File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change 11import { TypeScriptPluginConfig } from '@graphql-codegen/typescript' ;
22
33export type ValidationSchema = 'yup' | 'zod' | 'myzod' ;
4+ export type ValidationSchemaExportType = 'function' | 'const' ;
45
56export interface DirectiveConfig {
67 [ directive : string ] : {
@@ -234,4 +235,20 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
234235 * ```
235236 */
236237 directives ?: DirectiveConfig ;
238+ /**
239+ * @description Specify validation schema export type
240+ * @default function
241+ *
242+ * @exampleMarkdown
243+ * ```yml
244+ * generates:
245+ * path/to/file.ts:
246+ * plugins:
247+ * - typescript
248+ * - graphql-codegen-validation-schema
249+ * config:
250+ * validationSchemaExportType: const
251+ * ```
252+ */
253+ validationSchemaExportType ?: ValidationSchemaExportType ;
237254}
You can’t perform that action at this time.
0 commit comments