@omnigraph/odata
Version:
12 lines (11 loc) • 533 B
TypeScript
import DataLoader from 'dataloader';
import type { MeshFetch } from '@graphql-mesh/types';
export type DataloaderFactory = (context: any) => DataLoader<Request, Response>;
interface DataloaderFactoryOpts {
fetchFn: MeshFetch;
endpoint: string;
headersFactory: (resolverData: any, method: string) => Record<string, string>;
batchMode: 'none' | 'json' | 'multipart';
}
export declare function getDataloaderFactory({ fetchFn, endpoint, headersFactory, batchMode, }: DataloaderFactoryOpts): DataloaderFactory;
export {};