1- import { TypeScriptPluginConfig } from '@graphql-codegen/typescript' ;
1+ import type { TypeScriptPluginConfig } from '@graphql-codegen/typescript' ;
22
33export type ValidationSchema = 'yup' | 'zod' | 'myzod' ;
44export type ValidationSchemaExportType = 'function' | 'const' ;
55
66export interface DirectiveConfig {
77 [ directive : string ] : {
8- [ argument : string ] : string | string [ ] | DirectiveObjectArguments ;
9- } ;
8+ [ argument : string ] : string | string [ ] | DirectiveObjectArguments
9+ }
1010}
1111
1212export interface DirectiveObjectArguments {
13- [ matched : string ] : string | string [ ] ;
13+ [ matched : string ] : string | string [ ]
1414}
1515
1616interface ScalarSchemas {
17- [ name : string ] : string ;
17+ [ name : string ] : string
1818}
1919
2020export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
@@ -33,7 +33,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
3333 * schema: yup
3434 * ```
3535 */
36- schema ?: ValidationSchema ;
36+ schema ?: ValidationSchema
3737 /**
3838 * @description import types from generated typescript type path
3939 * if not given, omit import statement.
@@ -52,7 +52,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
5252 * importFrom: ./path/to/types
5353 * ```
5454 */
55- importFrom ?: string ;
55+ importFrom ?: string
5656 /**
5757 * @description Will use `import type {}` rather than `import {}` when importing generated typescript types.
5858 * This gives compatibility with TypeScript's "importsNotUsedAsValues": "error" option
@@ -74,7 +74,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
7474 * useTypeImports: true
7575 * ```
7676 */
77- useTypeImports ?: boolean ;
77+ useTypeImports ?: boolean
7878 /**
7979 * @description Prefixes all import types from generated typescript type.
8080 * @default ""
@@ -93,7 +93,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
9393 * importFrom: ./path/to/types
9494 * ```
9595 */
96- typesPrefix ?: string ;
96+ typesPrefix ?: string
9797 /**
9898 * @description Suffixes all import types from generated typescript type.
9999 * @default ""
@@ -112,7 +112,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
112112 * importFrom: ./path/to/types
113113 * ```
114114 */
115- typesSuffix ?: string ;
115+ typesSuffix ?: string
116116 /**
117117 * @description Generates validation schema for enum as TypeScript `type`
118118 * @default false
@@ -137,7 +137,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
137137 * enumsAsTypes: true
138138 * ```
139139 */
140- enumsAsTypes ?: boolean ;
140+ enumsAsTypes ?: boolean
141141 /**
142142 * @description Generates validation string schema as do not allow empty characters by default.
143143 * @default false
@@ -152,7 +152,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
152152 * notAllowEmptyString: true
153153 * ```
154154 */
155- notAllowEmptyString ?: boolean ;
155+ notAllowEmptyString ?: boolean
156156 /**
157157 * @description Extends or overrides validation schema for the built-in scalars and custom GraphQL scalars.
158158 *
@@ -174,7 +174,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
174174 * Email: z.string().email()
175175 * ```
176176 */
177- scalarSchemas ?: ScalarSchemas ;
177+ scalarSchemas ?: ScalarSchemas
178178 /**
179179 * @description Generates validation schema with GraphQL type objects.
180180 * but excludes "Query", "Mutation", "Subscription" objects.
@@ -193,7 +193,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
193193 * withObjectType: true
194194 * ```
195195 */
196- withObjectType ?: boolean ;
196+ withObjectType ?: boolean
197197 /**
198198 * @description Specify validation schema export type.
199199 * @default function
@@ -209,7 +209,7 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
209209 * validationSchemaExportType: const
210210 * ```
211211 */
212- validationSchemaExportType ?: ValidationSchemaExportType ;
212+ validationSchemaExportType ?: ValidationSchemaExportType
213213 /**
214214 * @description Generates validation schema with more API based on directive schema.
215215 * @exampleMarkdown
@@ -250,5 +250,5 @@ export interface ValidationSchemaPluginConfig extends TypeScriptPluginConfig {
250250 * exclusiveMax: max
251251 * ```
252252 */
253- directives ?: DirectiveConfig ;
253+ directives ?: DirectiveConfig
254254}
0 commit comments