import { GraphQLInterfaceType, GraphQLTypeResolver, InterfaceTypeDefinitionNode } from "graphql"; import { ObjectType, ClassType, TypeResolvable, InputType, KeyValue } from "../../../.."; import { GQLObjectType } from "./GQLObjectType"; export declare class InterfaceType extends GQLObjectType implements TypeResolvable { protected _typeResolver: GraphQLTypeResolver; private _possibleTypes; get definitionNode(): InterfaceTypeDefinitionNode; protected constructor(name: string); static create(name: string): InterfaceType>; static create(classType: T): InterfaceType; static create(inputType: InputType): InterfaceType>; static create(objectType: ObjectType): InterfaceType>; static create(interfaceType: InterfaceType): InterfaceType>; build(): GraphQLInterfaceType; /** * Set the type of the field * @param typeResolver the field resolver */ setTypeResolver(typeResolver: GraphQLTypeResolver): this; /** * Set the possible types of the interface to resolve the __typename * @param possibleTypes The possible types */ setPossibleTypes(...possibleTypes: ObjectType[]): this; /** * Set the possible types of the interface to resolve the __typename * @param possibleTypes The possible types */ addPossibleTypes(...possibleTypes: ObjectType[]): this; /** * Add a suffix to the name of your type ("Interface" by default) * @param suffix The suffix to add to the name */ suffix(suffix?: string): this; copy(): InterfaceType; convert(to: typeof InputType): InputType; convert(to: typeof ObjectType): ObjectType; defaultTypeResolver(obj: KeyValue): any; }