import { GraphQLInterfaceType, GraphQLObjectType } from './graphql'; import { ObjectTypeComposer } from './ObjectTypeComposer'; import type { GraphQLFieldConfig, GraphQLOutputType, GraphQLInputObjectType, GraphQLInputType, GraphQLResolveInfo, GraphQLTypeResolver } from './graphql'; import { InputTypeComposer } from './InputTypeComposer'; import type { TypeAsString, TypeDefinitionString } from './TypeMapper'; import { SchemaComposer } from './SchemaComposer'; import type { ObjectTypeComposerFieldConfigMap, ObjectTypeComposerFieldConfig, ObjectTypeComposerFieldConfigDefinition, ObjectTypeComposerFieldConfigAsObjectDefinition, ObjectTypeComposerFieldConfigMapDefinition, ObjectTypeComposerArgumentConfigMapDefinition, ObjectTypeComposerArgumentConfig, ObjectTypeComposerArgumentConfigDefinition, ObjectTypeComposerArgumentConfigMap } from './ObjectTypeComposer'; import { ListComposer } from './ListComposer'; import { NonNullComposer } from './NonNullComposer'; import { ThunkComposer } from './ThunkComposer'; import type { Extensions, MaybePromise, DirectiveArgs, Directive, ThunkWithSchemaComposer } from './utils/definitions'; import type { ToInputTypeOpts } from './utils/toInputType'; import { TypeInPath } from './utils/typeByPath'; import { NamedTypeComposer } from './utils/typeHelpers'; import type { ComposeNamedInputType, ComposeNamedOutputType } from './utils/typeHelpers'; import { SchemaPrinterOptions } from './utils/schemaPrinter'; export declare type InterfaceTypeComposerDefinition = TypeAsString | TypeDefinitionString | InterfaceTypeComposerAsObjectDefinition | GraphQLInterfaceType | Readonly>; export declare type InterfaceTypeComposerAsObjectDefinition = { name: string; fields?: ObjectTypeComposerFieldConfigMapDefinition; interfaces?: null | ThunkWithSchemaComposer>, SchemaComposer>; resolveType?: null | GraphQLTypeResolver; description?: null | string; extensions?: Extensions; directives?: Directive[]; }; export declare type InterfaceTypeComposerResolversMap = Map | GraphQLObjectType, InterfaceTypeComposerResolverCheckFn>; export declare type InterfaceTypeComposerResolverCheckFn = (value: TSource, context: TContext, info: GraphQLResolveInfo) => MaybePromise; export declare type InterfaceTypeComposerThunked = InterfaceTypeComposer | ThunkComposer, GraphQLInterfaceType>; export declare class InterfaceTypeComposer { schemaComposer: SchemaComposer; _gqType: GraphQLInterfaceType; _gqcFields: ObjectTypeComposerFieldConfigMap; _gqcInputTypeComposer: undefined | InputTypeComposer; _gqcInterfaces: Array>; _gqcTypeResolvers: undefined | InterfaceTypeComposerResolversMap; _gqcFallbackResolveType: ObjectTypeComposer | GraphQLObjectType | null; _gqcExtensions?: Extensions; _gqcDirectives?: Directive[]; _gqcIsModified?: boolean; static create(typeDef: InterfaceTypeComposerDefinition, schemaComposer: SchemaComposer): InterfaceTypeComposer; static createTemp(typeDef: InterfaceTypeComposerDefinition, schemaComposer?: SchemaComposer): InterfaceTypeComposer; constructor(graphqlType: GraphQLInterfaceType, schemaComposer: SchemaComposer); getFields(): ObjectTypeComposerFieldConfigMap; getFieldNames(): string[]; getField(fieldName: string): ObjectTypeComposerFieldConfig; hasField(fieldName: string): boolean; setFields(fields: ObjectTypeComposerFieldConfigMapDefinition): this; setField(fieldName: string, fieldConfig: ObjectTypeComposerFieldConfigDefinition): this; addFields(newFields: ObjectTypeComposerFieldConfigMapDefinition): this; removeField(fieldNameOrArray: string | string[]): this; removeOtherFields(fieldNameOrArray: string | string[]): this; reorderFields(names: string[]): this; extendField(fieldName: string, partialFieldConfig: Partial>): this; getFieldConfig(fieldName: string): GraphQLFieldConfig; getFieldType(fieldName: string): GraphQLOutputType; getFieldTypeName(fieldName: string): string; getFieldTC(fieldName: string): ComposeNamedOutputType; getFieldOTC(fieldName: string): ObjectTypeComposer; isFieldNonNull(fieldName: string): boolean; makeFieldNonNull(fieldNameOrArray: string | string[]): this; makeFieldNullable(fieldNameOrArray: string | string[]): this; isFieldPlural(fieldName: string): boolean; makeFieldPlural(fieldNameOrArray: string | string[]): this; makeFieldNonPlural(fieldNameOrArray: string | string[]): this; deprecateFields(fields: { [fieldName: string]: string; } | string[] | string): this; getFieldArgs(fieldName: string): ObjectTypeComposerArgumentConfigMap; getFieldArgNames(fieldName: string): string[]; hasFieldArg(fieldName: string, argName: string): boolean; getFieldArg(fieldName: string, argName: string): ObjectTypeComposerArgumentConfig; getFieldArgType(fieldName: string, argName: string): GraphQLInputType; getFieldArgTypeName(fieldName: string, argName: string): string; getFieldArgTC(fieldName: string, argName: string): ComposeNamedInputType; getFieldArgITC(fieldName: string, argName: string): InputTypeComposer; setFieldArgs(fieldName: string, args: ObjectTypeComposerArgumentConfigMapDefinition): this; addFieldArgs(fieldName: string, newArgs: ObjectTypeComposerArgumentConfigMapDefinition): this; setFieldArg(fieldName: string, argName: string, argConfig: ObjectTypeComposerArgumentConfigDefinition): this; isFieldArgPlural(fieldName: string, argName: string): boolean; makeFieldArgPlural(fieldName: string, argNameOrArray: string | string[]): this; makeFieldArgNonPlural(fieldName: string, argNameOrArray: string | string[]): this; isFieldArgNonNull(fieldName: string, argName: string): boolean; makeFieldArgNonNull(fieldName: string, argNameOrArray: string | string[]): this; makeFieldArgNullable(fieldName: string, argNameOrArray: string | string[]): this; getType(): GraphQLInterfaceType; 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 | InterfaceTypeComposer): InterfaceTypeComposer; cloneTo(anotherSchemaComposer: SchemaComposer, cloneMap?: Map): InterfaceTypeComposer; merge(type: GraphQLInterfaceType | GraphQLObjectType | InterfaceTypeComposer | ObjectTypeComposer): this; getInputType(): GraphQLInputObjectType; hasInputTypeComposer(): boolean; setInputTypeComposer(itc: InputTypeComposer): this; getInputTypeComposer(opts?: ToInputTypeOpts): InputTypeComposer; getITC(opts?: ToInputTypeOpts): InputTypeComposer; removeInputTypeComposer(): this; getResolveType(): GraphQLTypeResolver | undefined | null; setResolveType(fn: GraphQLTypeResolver | undefined | null): this; hasTypeResolver(type: ObjectTypeComposer | GraphQLObjectType): boolean; getTypeResolvers(): InterfaceTypeComposerResolversMap; getTypeResolverCheckFn(type: ObjectTypeComposer | GraphQLObjectType): InterfaceTypeComposerResolverCheckFn; getTypeResolverNames(): string[]; getTypeResolverTypes(): GraphQLObjectType[]; setTypeResolvers(typeResolversMap: InterfaceTypeComposerResolversMap): this; _initResolveTypeFn(): this; _isTypeResolversValid(typeResolversMap: InterfaceTypeComposerResolversMap): true; _isTypeResolverValid(composeType: ObjectTypeComposer | GraphQLObjectType, checkFn: InterfaceTypeComposerResolverCheckFn): true; _isTypeResolversAsync(typeResolversMap: InterfaceTypeComposerResolversMap): boolean; addTypeResolver(type: ObjectTypeComposer | GraphQLObjectType, checkFn: InterfaceTypeComposerResolverCheckFn): this; removeTypeResolver(type: ObjectTypeComposer | GraphQLObjectType): this; setTypeResolverFallback(type: ObjectTypeComposer | GraphQLObjectType | null): this; getInterfaces(): Array>; getInterfacesTypes(): Array; setInterfaces(interfaces: ReadonlyArray>): this; hasInterface(iface: InterfaceTypeComposerDefinition): boolean; addInterface(iface: InterfaceTypeComposerDefinition | InterfaceTypeComposerThunked): this; addInterfaces(ifaces: ReadonlyArray | InterfaceTypeComposerThunked>): this; removeInterface(iface: InterfaceTypeComposerDefinition): 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; getFieldExtensions(fieldName: string): Extensions; setFieldExtensions(fieldName: string, extensions: Extensions): this; extendFieldExtensions(fieldName: string, extensions: Extensions): this; clearFieldExtensions(fieldName: string): this; getFieldExtension(fieldName: string, extensionName: string): unknown; hasFieldExtension(fieldName: string, extensionName: string): boolean; setFieldExtension(fieldName: string, extensionName: string, value: unknown): this; removeFieldExtension(fieldName: string, extensionName: string): this; getFieldArgExtensions(fieldName: string, argName: string): Extensions; setFieldArgExtensions(fieldName: string, argName: string, extensions: Extensions): this; extendFieldArgExtensions(fieldName: string, argName: string, extensions: Extensions): this; clearFieldArgExtensions(fieldName: string, argName: string): this; getFieldArgExtension(fieldName: string, argName: string, extensionName: string): unknown; hasFieldArgExtension(fieldName: string, argName: string, extensionName: string): boolean; setFieldArgExtension(fieldName: string, argName: string, extensionName: string, value: unknown): this; removeFieldArgExtension(fieldName: string, argName: string, 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; getFieldDirectives(fieldName: string): Array; setFieldDirectives(fieldName: string, directives: Array | undefined): this; getFieldDirectiveNames(fieldName: string): string[]; getFieldDirectiveByName(fieldName: string, directiveName: string): DirectiveArgs | undefined; setFieldDirectiveByName(fieldName: string, directiveName: string, args?: DirectiveArgs): this; getFieldDirectiveById(fieldName: string, idx: number): DirectiveArgs | undefined; getFieldArgDirectives(fieldName: string, argName: string): Array; setFieldArgDirectives(fieldName: string, argName: string, directives: Array): this; getFieldArgDirectiveNames(fieldName: string, argName: string): string[]; getFieldArgDirectiveByName(fieldName: string, argName: string, directiveName: string): DirectiveArgs | undefined; setFieldArgDirectiveByName(fieldName: string, argName: string, directiveName: string, args?: DirectiveArgs): this; getFieldArgDirectiveById(fieldName: string, argName: string, idx: number): DirectiveArgs | undefined; get(path: string | string[]): TypeInPath | void; getNestedTCs(opts?: { exclude?: string[]; }, passedTypes?: Set>): Set>; toSDL(opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[]; }): string; } //# sourceMappingURL=InterfaceTypeComposer.d.ts.map