@pothos/core
Version:
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
15 lines (14 loc) • 950 B
TypeScript
import type { FieldMap, InterfaceParam, PothosInterfaceTypeConfig, PothosMutationTypeConfig, PothosObjectTypeConfig, PothosQueryTypeConfig, PothosSubscriptionTypeConfig, SchemaTypes } from '../types/index.js';
import { BaseTypeRef } from './base.js';
import type { FieldRef } from './field.js';
export type ObjectLikeConfig = PothosMutationTypeConfig | PothosObjectTypeConfig | PothosQueryTypeConfig | PothosSubscriptionTypeConfig;
export declare class TypeRefWithFields<Types extends SchemaTypes, Config extends ObjectLikeConfig | PothosInterfaceTypeConfig> extends BaseTypeRef<Types, Config> {
private fields;
private fieldCbs;
private interfaces;
addFields(fields: () => FieldMap): void;
addInterfaces(interfaces: InterfaceParam<Types>[] | (() => InterfaceParam<Types>[])): void;
onField(cb: (name: string, ref: FieldRef<Types>) => void): void;
prepareForBuild(): void;
}
//# sourceMappingURL=base-with-fields.d.ts.map