Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

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

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

Type Parameters

Types extends SchemaTypes
ParentShape
Type extends TypeParam<Types>
Nullable extends FieldNullability<Type>
Args extends InputFieldMap
ResolveReturnShape
Key
CacheKey
optional
Kind extends FieldKind = FieldKind
optional
ByPath extends boolean = boolean
definition: Omit<FieldOptionsFromKind<Types, ParentShape, Type, Nullable, Args, Kind, Key, ResolveReturnShape>, "resolve"> & { byPath?: ByPath; load: (
keys: Key[],
context: Types["Context"],
args: false extends ByPath ? never : InputShapeFromFields<Args>,
) => Promise<readonly (Error | LoaderShapeFromType<Types, Type, Nullable>)[]>; loaderOptions?: DataLoader.Options<Key, LoaderShapeFromType<Types, Type, Nullable>, CacheKey>; sort?: (value: LoaderShapeFromType<Types, Type, false>) => Key; resolve: Resolver<ParentShape, InputShapeFromFields<Args>, Types["Context"], (Type extends unknown[] ? [OutputRef<Key>] : OutputRef<Key>) extends infer KeyType ? KeyType extends OutputRef | [OutputRef] ? ShapeFromTypeParam<Types, KeyType, Nullable extends FieldNullability<KeyType> ? Nullable : never> : never : never, ResolveReturnShape>; }