Skip to content

Commit 8e68319

Browse files
simonljusCode-Hex
authored andcommitted
add withInterfaceType in config
1 parent 3f806e4 commit 8e68319

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/config.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,24 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
194194
* ```
195195
*/
196196
withObjectType?: boolean
197+
/**
198+
* @description Generates validation schema with GraphQL type interfaces.
199+
*
200+
* @exampleMarkdown
201+
* ```yml
202+
* generates:
203+
* path/to/types.ts:
204+
* plugins:
205+
* - typescript
206+
* path/to/schemas.ts:
207+
* plugins:
208+
* - graphql-codegen-validation-schema
209+
* config:
210+
* schema: yup
211+
* withInterfaceType: true
212+
* ```
213+
*/
214+
withInterfaceType?: boolean;
197215
/**
198216
* @description Specify validation schema export type.
199217
* @default function

0 commit comments

Comments
 (0)