Documentation
API Reference
Packages
batch-delegate

@graphql-tools/batch-delegate

Interfaces

Type Aliases

Functions

Type Aliases

BatchDelegateFn

Ƭ BatchDelegateFn<TContext, K>: (batchDelegateOptions: BatchDelegateOptions<TContext, K>) => any

Type parameters

NameType
TContextRecord<string, any>
Kany

Type declaration

▸ (batchDelegateOptions): any

Parameters
NameType
batchDelegateOptionsBatchDelegateOptions<TContext, K>
Returns

any

Defined in

packages/batch-delegate/src/types.ts:4


BatchDelegateOptionsFn

Ƭ BatchDelegateOptionsFn<TContext, K>: (batchDelegateOptions: BatchDelegateOptions<TContext, K>, keys: ReadonlyArray<K>) => IDelegateToSchemaOptions<TContext>

Type parameters

NameType
TContextRecord<string, any>
Kany

Type declaration

▸ (batchDelegateOptions, keys): IDelegateToSchemaOptions<TContext>

Parameters
NameType
batchDelegateOptionsBatchDelegateOptions<TContext, K>
keysReadonlyArray<K>
Returns

IDelegateToSchemaOptions<TContext>

Defined in

packages/batch-delegate/src/types.ts:8

Functions

batchDelegateToSchema

batchDelegateToSchema<TContext>(options): any

Type parameters

NameType
TContextany

Parameters

NameType
optionsBatchDelegateOptions<TContext, any, any, any>

Returns

any

Defined in

packages/batch-delegate/src/batchDelegateToSchema.ts:4


createBatchDelegateFn

createBatchDelegateFn<K, V, C>(optionsOrArgsFromKeys, lazyOptionsFn?, dataLoaderOptions?, valuesFromResults?): BatchDelegateFn<K>

Type parameters

NameType
Kany
Vany
CK

Parameters

NameType
optionsOrArgsFromKeysCreateBatchDelegateFnOptions<Record<string, any>, any, any, any> | (keys: readonly K[]) => Record<string, any>
lazyOptionsFn?BatchDelegateOptionsFn
dataLoaderOptions?Options<K, V, C>
valuesFromResults?(results: any, keys: readonly K[]) => V[]

Returns

BatchDelegateFn<K>

Defined in

packages/batch-delegate/src/createBatchDelegateFn.ts:5