UNPKG

997 BTypeScriptView Raw
1import { DecoratorConfig } from './visitor';
2import { TypeScriptPluginConfig } from '@graphql-codegen/typescript';
3export interface TypeGraphQLPluginConfig extends TypeScriptPluginConfig {
4 /**
5 * @name decoratorName
6 * @description allow overriding of TypeGraphQL decorator types
7 * @default `{ type: 'ObjectType', interface: 'InterfaceType', arguments: 'ArgsType', field: 'Field', input: 'InputType' }`
8 */
9 decoratorName?: Partial<DecoratorConfig>;
10 /**
11 * @name decorateTypes
12 * @description Speciies the objects that will have TypeGraphQL decorators prepended to them, by name. Non-matching types will still be output, but without decorators. If not set, all types will be decorated.
13 * @type string[]
14 * @example Decorate only type User
15 * ```yml
16 * generates:
17 * types.ts:
18 * plugins:
19 * - typescript-type-graphql
20 * config:
21 * decorateTypes:
22 * - User
23 * ```
24 */
25 decorateTypes?: string[];
26}