import { SamplingStrategy, IDocumentConnector, IDataExists } from './documentConnector'; import { IGQLType } from 'prisma-datamodel'; export interface IRelationResolver { resolve(types: IGQLType[], resolver: IDataExists, schemaName: string): Promise; } /** * Resolves relations on a given model by querying the database. */ export declare class RelationResolver implements IRelationResolver { private samplingStrategy; private ratioThreshold; /** * @param samplingStrategy Sampling strategy for picking samples. * @param threshold Ratio of hits/(misses + hits) we need to accept. */ constructor(samplingStrategy?: SamplingStrategy, threshold?: number); /** * Resolves relations in the given type list. * @param types Types to resolve relations for. Can be a subset of all types in the database, * we still check all collections. Types are edited in-place. * @param connector Database connector for sampling * @param schemaName The schema to work on. */ resolve(types: IGQLType[], connector: IDocumentConnector, schemaName: string): Promise; }