import { TypeStorage } from './TypeStorage'; import { TypeMapper } from './TypeMapper'; import { ObjectTypeComposer, ObjectTypeComposerDefinition } from './ObjectTypeComposer'; import { InputTypeComposer, InputTypeComposerDefinition } from './InputTypeComposer'; import { ScalarTypeComposer, ScalarTypeComposerDefinition } from './ScalarTypeComposer'; import { EnumTypeComposer, EnumTypeComposerDefinition } from './EnumTypeComposer'; import { InterfaceTypeComposer, InterfaceTypeComposerDefinition } from './InterfaceTypeComposer'; import { UnionTypeComposer, UnionTypeComposerDefinition } from './UnionTypeComposer'; import { Resolver, ResolverDefinition } from './Resolver'; import { AnyType, NamedTypeComposer, ComposeInputTypeDefinition, ComposeOutputTypeDefinition } from './utils/typeHelpers'; import { GraphQLSchema, GraphQLDirective, GraphQLType, GraphQLNamedType, SchemaDefinitionNode, GraphQLResolveInfo, SchemaExtensionNode, GraphQLScalarTypeConfig } from './graphql'; import { SchemaPrinterOptions, SchemaComposerPrinterOptions } from './utils/schemaPrinter'; declare type ExtraSchemaConfig = { description?: string | null; types?: GraphQLNamedType[] | null; directives?: GraphQLDirective[] | null; extensions?: any | null; astNode?: SchemaDefinitionNode | null; extensionASTNodes?: ReadonlyArray | null; keepUnusedTypes?: boolean | null; }; export declare type GraphQLToolsResolveMethods = { [typeName: string]: { [fieldName: string]: ((source: any, args: Record, context: TContext, info: GraphQLResolveInfo) => any) | string | number | Record; } | GraphQLNamedType | GraphQLScalarTypeConfig; }; export declare const BUILT_IN_DIRECTIVES: GraphQLDirective[]; export declare class SchemaComposer extends TypeStorage> { typeMapper: TypeMapper; _schemaMustHaveTypes: Array>; _directives: Array; _description: string | undefined; constructor(schemaOrSDL?: GraphQLSchema | string); get Query(): ObjectTypeComposer; get Mutation(): ObjectTypeComposer; get Subscription(): ObjectTypeComposer; buildSchema(extraConfig?: ExtraSchemaConfig): GraphQLSchema; addSchemaMustHaveType(type: AnyType): this; removeEmptyTypes(tc: ObjectTypeComposer, passedTypes?: Set): void; clone(): SchemaComposer; merge(schema: GraphQLSchema | SchemaComposer): this; getDescription(): string | undefined; setDescription(description: string | undefined): this; addTypeDefs(typeDefs: string): TypeStorage>; addResolveMethods(typesFieldsResolve: GraphQLToolsResolveMethods): void; createObjectTC(typeDef: ObjectTypeComposerDefinition): ObjectTypeComposer; createInputTC(typeDef: InputTypeComposerDefinition): InputTypeComposer; createEnumTC(typeDef: EnumTypeComposerDefinition): EnumTypeComposer; createInterfaceTC(typeDef: InterfaceTypeComposerDefinition): InterfaceTypeComposer; createUnionTC(typeDef: UnionTypeComposerDefinition): UnionTypeComposer; createScalarTC(typeDef: ScalarTypeComposerDefinition): ScalarTypeComposer; createResolver(opts: ResolverDefinition): Resolver; createTC(typeOrSDL: ComposeOutputTypeDefinition | ComposeInputTypeDefinition): NamedTypeComposer; createTempTC(typeOrSDL: ComposeOutputTypeDefinition | ComposeInputTypeDefinition): NamedTypeComposer; getOrCreateTC(typeName: string, onCreate?: (tc: ObjectTypeComposer) => any): ObjectTypeComposer; getOrCreateOTC(typeName: string, onCreate?: (tc: ObjectTypeComposer) => any): ObjectTypeComposer; getOrCreateITC(typeName: string, onCreate?: (tc: InputTypeComposer) => any): InputTypeComposer; getOrCreateETC(typeName: string, onCreate?: (tc: EnumTypeComposer) => any): EnumTypeComposer; getOrCreateIFTC(typeName: string, onCreate?: (tc: InterfaceTypeComposer) => any): InterfaceTypeComposer; getOrCreateUTC(typeName: string, onCreate?: (tc: UnionTypeComposer) => any): UnionTypeComposer; getOrCreateSTC(typeName: string, onCreate?: (tc: ScalarTypeComposer) => any): ScalarTypeComposer; getOTC(typeName: unknown): ObjectTypeComposer; getITC(typeName: unknown): InputTypeComposer; getETC(typeName: unknown): EnumTypeComposer; getIFTC(typeName: unknown): InterfaceTypeComposer; getUTC(typeName: unknown): UnionTypeComposer; getSTC(typeName: unknown): ScalarTypeComposer; getAnyTC(typeOrName: string | AnyType | GraphQLType): NamedTypeComposer; addAsComposer(typeOrSDL: ComposeOutputTypeDefinition | ComposeInputTypeDefinition): string; isObjectType(type: string | AnyType | GraphQLType): boolean; isInputObjectType(type: string | AnyType | GraphQLType): boolean; isScalarType(type: string | AnyType | GraphQLType): boolean; isEnumType(type: string | AnyType | GraphQLType): boolean; isInterfaceType(type: string | AnyType | GraphQLType): boolean; isUnionType(type: string | AnyType | GraphQLType): boolean; clear(): void; add(typeOrSDL: ComposeOutputTypeDefinition | ComposeInputTypeDefinition): string; set(key: unknown, value: NamedTypeComposer): this; addDirective(directive: GraphQLDirective): this; removeDirective(directive: GraphQLDirective): this; getDirectives(): Array; _getDirective(name: string): GraphQLDirective | undefined; getDirective(name: string): GraphQLDirective; hasDirective(directive: string | GraphQLDirective): boolean; toString(): string; toJSON(): string; inspect(): string; getTypeSDL(typeName: string, opts?: SchemaPrinterOptions & { deep?: boolean; exclude?: string[]; }): string; toSDL(options?: SchemaComposerPrinterOptions): string; getResolveMethods(opts?: { exclude?: string[] | null; }): GraphQLToolsResolveMethods; } export {}; //# sourceMappingURL=SchemaComposer.d.ts.map