import { type InterfaceRef, type ObjectRef, type SchemaTypes } from '@pothos/core'; import type { GraphQLResolveInfo } from 'graphql'; import type { SelectionMap } from './types'; import { type SelectionState } from './util/selections'; interface ResolvablePromise { promise: Promise; resolve: (value: T) => void; reject: (err: unknown) => void; } export declare class ModelLoader { context: object; builder: PothosSchemaTypes.SchemaBuilder; findUnique: (model: Record, ctx: {}) => unknown; modelName: string; queryCache: Map; staged: Set<{ state: SelectionState; models: Map | null>>; }>; tick: Promise; constructor(context: object, builder: PothosSchemaTypes.SchemaBuilder, modelName: string, findUnique: (model: Record, ctx: {}) => unknown); static forRef(ref: InterfaceRef | ObjectRef, modelName: string, findUnique: ((model: Record, ctx: {}) => unknown) | undefined, builder: PothosSchemaTypes.SchemaBuilder): import("@pothos/core").ContextCache; static getFindUnique(findBy: string | { name: string | null; fields: string[]; }): (model: Record) => {}; static getDefaultFindBy(ref: InterfaceRef | ObjectRef, modelName: string, builder: PothosSchemaTypes.SchemaBuilder): string | { name: string | null; fields: string[]; }; static getDefaultFindUnique(ref: InterfaceRef | ObjectRef, modelName: string, builder: PothosSchemaTypes.SchemaBuilder): (model: Record) => {}; static getDefaultIDSelection(ref: InterfaceRef | ObjectRef, modelName: string, builder: PothosSchemaTypes.SchemaBuilder): Record; static getCursorSelection(ref: InterfaceRef | ObjectRef, modelName: string, cursor: string, builder: PothosSchemaTypes.SchemaBuilder): Record; static getFindUniqueForField(ref: InterfaceRef | ObjectRef, modelName: string, fieldName: string, builder: PothosSchemaTypes.SchemaBuilder): (model: Record) => {}; getSelection(info: GraphQLResolveInfo): { selection: SelectionState; query: SelectionMap; }; loadSelection(info: GraphQLResolveInfo, model: object): Promise | null>; stageQuery(selection: SelectionState, query: SelectionMap, model: object): Promise | null>; initLoad(state: SelectionState, initialModel: {}): Promise | null>; } export {}; //# sourceMappingURL=model-loader.d.ts.map