UNPKG

@omnigraph/odata

Version:
12 lines (11 loc) 533 B
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 {};