UNPKG

graphql-composer

Version:
23 lines (22 loc) 1.57 kB
import { ObjectType, InterfaceType, InputType, GQLObjectType, GQLType, GQLAnyType, Removable, Field, InputField, GQLField, ResolveFunction } from ".."; export declare type TranformableTypes = typeof ObjectType | typeof InterfaceType | typeof InputType | typeof GQLObjectType | typeof GQLType; export declare class Wrapper { protected _types: GQLAnyType[]; get types(): GQLAnyType<any, any>[]; protected constructor(...types: GQLAnyType[]); static create(...types: GQLAnyType[]): Wrapper; setTypes(...types: GQLAnyType[]): this; addTypes(...types: GQLAnyType[]): this; removeTypes(...types: Removable<GQLAnyType>): this; addMiddlewares(...middlewares: ResolveFunction[]): void; transform(toTransform: typeof ObjectType, cb: (type: ObjectType) => void): any; transform(toTransform: typeof InputType, cb: (field: InputType) => void): any; transform(toTransform: typeof GQLType, cb: (type: GQLType) => void): any; transform(toTransform: typeof InterfaceType, cb: (type: InterfaceType) => void): any; transform(toTransform: typeof GQLObjectType, cb: (type: GQLObjectType) => void): any; transformFields(fieldType: typeof ObjectType, cb: (field: Field) => void): any; transformFields(fieldType: typeof InterfaceType, cb: (field: Field) => void): any; transformFields(fieldType: typeof InputType, cb: (field: InputField) => void): any; transformFields(fieldType: typeof GQLObjectType, cb: (field: Field) => void): any; transformFields(fieldType: typeof GQLType, cb: (field: GQLField) => void): any; }