import { GraphQLUnionType, GraphQLObjectType, GraphQLResolveInfo, GraphQLTypeResolver } from './graphql'; import { ObjectTypeComposer, ObjectTypeComposerDefinition, ObjectTypeComposerThunked } from './ObjectTypeComposer'; import type { TypeDefinitionString, TypeNameString } from './TypeMapper'; import { SchemaComposer } from './SchemaComposer'; import { ListComposer } from './ListComposer'; import { NonNullComposer } from './NonNullComposer'; import { ThunkComposer } from './ThunkComposer'; import type { Thunk, Extensions, MaybePromise, Directive, DirectiveArgs } from './utils/definitions'; import { NamedTypeComposer } from './utils/typeHelpers'; import { SchemaPrinterOptions } from './utils/schemaPrinter'; export declare type UnionTypeComposerDefinition = TypeDefinitionString | TypeNameString | UnionTypeComposerAsObjectDefinition | GraphQLUnionType; export declare type UnionTypeComposerAsObjectDefinition = { name: string; types?: Thunk> | null>; resolveType?: GraphQLTypeResolver | null; description?: string | null; extensions?: Extensions; directives?: Directive[]; }; export declare type UnionTypeComposerResolversMap = Map, UnionTypeComposerResolverCheckFn>; export declare type UnionTypeComposerResolversMapDefinition = Map | ObjectTypeComposerDefinition, UnionTypeComposerResolverCheckFn> | Readonly>; export declare type UnionTypeComposerResolverCheckFn = (value: TSource, context: TContext, info: GraphQLResolveInfo) => MaybePromise; export declare type UnionTypeComposerThunked = UnionTypeComposer | ThunkComposer, GraphQLUnionType>; export declare class UnionTypeComposer { schemaComposer: SchemaComposer; _gqType: GraphQLUnionType; _gqcTypes: Set>; _gqcTypeResolvers: UnionTypeComposerResolversMap; _gqcFallbackResolveType: ObjectTypeComposer | GraphQLObjectType | null; _gqcExtensions?: Extensions; _gqcDirectives?: Directive[]; _gqcIsModified?: boolean; static create(typeDef: UnionTypeComposerDefinition, schemaComposer: SchemaComposer): UnionTypeComposer; static createTemp(typeDef: UnionTypeComposerDefinition, schemaComposer?: SchemaComposer): UnionTypeComposer; constructor(graphqlType: GraphQLUnionType, schemaComposer: SchemaComposer); hasType(name: ObjectTypeComposerDefinition): boolean; getTypes(): Array>; getTypeComposers(): Array>; getTypeNames(): string[]; clearTypes(): this; setTypes(types: ReadonlyArray | ObjectTypeComposerDefinition>): this; addType(type: ObjectTypeComposerThunked | ObjectTypeComposerDefinition): this; addTypes(types: ReadonlyArray | ObjectTypeComposerDefinition>): this; removeType(nameOrArray: string | string[]): this; removeOtherTypes(nameOrArray: string | string[]): this; getType(): GraphQLUnionType; getTypePlural(): ListComposer>; getTypeNonNull(): NonNullComposer>; get List(): ListComposer>; get NonNull(): NonNullComposer>; getTypeName(): string; setTypeName(name: string): this; getDescription(): string; setDescription(description: string): this; clone(newTypeNameOrTC: string | UnionTypeComposer): UnionTypeComposer; cloneTo(anotherSchemaComposer: SchemaComposer, cloneMap?: Map): UnionTypeComposer; merge(type: GraphQLUnionType | UnionTypeComposer): this; getResolveType(): GraphQLTypeResolver | undefined | null; setResolveType(fn: GraphQLTypeResolver | undefined | null): this; hasTypeResolver(type: ObjectTypeComposerThunked | ObjectTypeComposerDefinition): boolean; getTypeResolvers(): UnionTypeComposerResolversMap; getTypeResolverCheckFn(type: ObjectTypeComposerThunked | ObjectTypeComposerDefinition): UnionTypeComposerResolverCheckFn; getTypeResolverNames(): string[]; getTypeResolverTypes(): Array>; setTypeResolvers(typeResolversMap: UnionTypeComposerResolversMapDefinition): this; _initResolveTypeFn(): this; _convertObjectType(type: ObjectTypeComposerThunked | ObjectTypeComposerDefinition): ObjectTypeComposerThunked; _convertTypeResolvers(typeResolversMap: UnionTypeComposerResolversMapDefinition): UnionTypeComposerResolversMap; _isTypeResolversAsync(typeResolversMap: UnionTypeComposerResolversMap): boolean; addTypeResolver(type: ObjectTypeComposerDefinition, checkFn: UnionTypeComposerResolverCheckFn): this; removeTypeResolver(type: ObjectTypeComposerDefinition): this; setTypeResolverFallback(type: ObjectTypeComposer | GraphQLObjectType | null): this; getExtensions(): Extensions; setExtensions(extensions: Extensions | undefined): this; extendExtensions(extensions: Extensions): this; clearExtensions(): this; getExtension(extensionName: string): unknown; hasExtension(extensionName: string): boolean; setExtension(extensionName: string, value: unknown): this; removeExtension(extensionName: string): this; getDirectives(): Array; setDirectives(directives: Array): this; getDirectiveNames(): string[]; getDirectiveByName(directiveName: string): DirectiveArgs | undefined; setDirectiveByName(directiveName: string, args?: DirectiveArgs): this; getDirectiveById(idx: number): DirectiveArgs | undefined; getNestedTCs(opts?: { exclude?: string[] | undefined; }, passedTypes?: Set>): Set>; toSDL(opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[]; }): string; } //# sourceMappingURL=UnionTypeComposer.d.ts.map