UNPKG

@pothos/core

Version:

Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript

38 lines 2.05 kB
import { BaseTypeRef } from './refs/base'; import type { ConfigurableRef, FieldMap, GraphQLFieldKind, InputFieldMap, InputRef, OutputType, PothosFieldConfig, PothosTypeConfig, SchemaTypes } from './types'; export declare class ConfigStore<Types extends SchemaTypes> { typeConfigs: Map<string, PothosTypeConfig>; private fields; private refs; private implementors; private pendingActions; private paramAssociations; private pendingTypeConfigResolutions; private pending; private builder; constructor(builder: PothosSchemaTypes.SchemaBuilder<Types>); addFields(param: ConfigurableRef<Types>, fields: () => FieldMap): void; addInputFields(param: ConfigurableRef<Types>, fields: () => InputFieldMap): void; associateParamWithRef<T>(param: ConfigurableRef<Types>, ref: BaseTypeRef<Types, T> | string): void; onTypeConfig(param: ConfigurableRef<Types>, onConfig: (config: PothosTypeConfig, ref: BaseTypeRef<Types>) => void): void; onTypeConfigOfKind<Kind extends PothosTypeConfig['kind']>(param: ConfigurableRef<Types>, kind: Kind, onConfig: (config: PothosTypeConfig & { kind: Kind; }) => void): void; addTypeRef<T extends PothosTypeConfig>(ref: BaseTypeRef<Types, T>): void; subscribeToFields(_ref: BaseTypeRef<Types>): void; hasImplementation(typeName: string): boolean; hasConfig(ref: ConfigurableRef<Types> | string): boolean; getTypeConfig<T extends PothosTypeConfig['kind']>(ref: ConfigurableRef<Types> | string, kind?: T): Extract<PothosTypeConfig, { kind: T; }>; getInputTypeRef(param: ConfigurableRef<Types> | string): InputRef<unknown>; getOutputTypeRef(param: ConfigurableRef<Types> | string): OutputType<Types>; getFields<T extends GraphQLFieldKind>(name: string, kind?: T): Map<string, Extract<PothosFieldConfig<Types>, { graphqlKind: T; }>>; prepareForBuild(): void; onPrepare(cb: () => void): void; private resolveParamAssociations; private describeRef; } //# sourceMappingURL=config-store.d.ts.map