UNPKG

graphql-composer

Version:
14 lines (13 loc) 821 B
import { GraphQLFieldConfigMap } from "graphql"; import { Field, ClassType, StringKeyOf, InstanceOf, Removable } from "../../../.."; import { GQLType } from "../GQLType"; export declare abstract class GQLObjectType<BuiltType = any, T extends ClassType<any> = any, ExtensionsType = any> extends GQLType<BuiltType, T, ExtensionsType> { protected _fields: Field<StringKeyOf<InstanceOf<T>>>[]; get fields(): Field<StringKeyOf<InstanceOf<T>>, any>[]; constructor(name: string); setFields(...fields: Field<StringKeyOf<InstanceOf<T>>>[]): this; addFields(...fields: Field<StringKeyOf<InstanceOf<T>>>[]): this; removeFields(...fields: Removable<Field<StringKeyOf<InstanceOf<T>>>>): this; transformFields(cb: (field: Field) => void): this; protected getFields(): GraphQLFieldConfigMap<any, any>; }