Module

x/pothos/packages/plugin-dataloader/types.ts>DataLoaderOptions

Pothos GraphQL is library for creating GraphQL schemas in typescript using a strongly typed code first approach
Go to Latest
type alias DataLoaderOptions
import { type DataLoaderOptions } from "https://dotland.deno.dev/x/pothos@release-1713397530/packages/plugin-dataloader/types.ts";

Type Parameters

Types extends SchemaTypes
Shape
Key extends bigint | number | string
CacheKey
definition: { load: (keys: Key[], context: Types["Context"]) => Promise<readonly (Error | Shape)[]>; loaderOptions?: DataLoader.Options<Key, Shape, CacheKey>; } & ({ toKey: (value: Shape) => Key; cacheResolved?: boolean; sort?: boolean; } | { toKey?: undefined; cacheResolved?: (value: Shape) => Key; sort?: (value: Shape) => Key; })