import { type MaybePromise, type SchemaTypes } from '@pothos/core'; import DataLoader, { type Options } from 'dataloader'; import type { GraphQLResolveInfo } from 'graphql'; export declare function rejectErrors(val: MaybePromise): MaybePromise<(Promise | T)[]>; export declare function clearAllDataLoaders(context: object): void; export declare function loadAndSort(load: (keys: K[], context: C, args: Args, info: GraphQLResolveInfo) => MaybePromise, toKey: false | ((val: V) => K) | undefined): ((keys: K[], context: C, args: Args, info: GraphQLResolveInfo) => MaybePromise) | ((keys: K[], context: C, args: Args, info: GraphQLResolveInfo) => Promise<(V | null)[]>); export declare function dataloaderGetter(loaderOptions: Options | undefined, load: (keys: K[], context: SchemaTypes['Context']) => Promise, toKey: ((val: V) => K) | undefined, sort: boolean | ((val: V) => K) | undefined): import("@pothos/core").ContextCache, object, []>; export declare function pathDataloaderGetter(loaderOptions: Options | undefined, load: (keys: K[], context: SchemaTypes['Context'], args: Args, info: GraphQLResolveInfo) => Promise, toKey: ((val: V) => K) | undefined, sort: boolean | ((val: V) => K) | undefined, byPath?: boolean): (args: Args, ctx: SchemaTypes['Context'], info: GraphQLResolveInfo) => DataLoader; export declare function cacheKey(path: GraphQLResolveInfo['path'] | undefined): string; //# sourceMappingURL=util.d.ts.map