@graphql-tools/batch-delegate

Type aliases#

Functions#

Type aliases#

BatchDelegateFn#

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

Type parameters:#

NameDefault
TContextRecord<string, any\>
Kany

Defined in: packages/batch-delegate/src/types.ts:12


BatchDelegateOptionsFn#

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

Type parameters:#

NameDefault
TContextRecord<string, any\>
Kany

Defined in: packages/batch-delegate/src/types.ts:16


DataLoaderCache#

Ƭ DataLoaderCache<K, V, C\>: WeakMap<ReadonlyArray<FieldNode\>, WeakMap<GraphQLSchema | SubschemaConfig, DataLoader<K, V, C\>\>\>

Type parameters:#

NameDefault
Kany
Vany
CK

Defined in: packages/batch-delegate/src/types.ts:7

Functions#

batchDelegateToSchema#

batchDelegateToSchema(options: BatchDelegateOptions): any

Parameters:#

NameType
optionsBatchDelegateOptions

Returns: any

Defined in: packages/batch-delegate/src/batchDelegateToSchema.ts:5


createBatchDelegateFn#

createBatchDelegateFn<K, V, C\>(optionsOrArgsFromKeys: CreateBatchDelegateFnOptions | (keys: ReadonlyArray<K\>) => Record<string, any\>, lazyOptionsFn?: BatchDelegateOptionsFn, dataLoaderOptions?: DataLoader.Options<K, V, C\>, valuesFromResults?: (results: any, keys: ReadonlyArray<K\>) => V[]): BatchDelegateFn<K\>

Type parameters:#

NameDefault
Kany
Vany
CK

Parameters:#

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

Returns: BatchDelegateFn<K\>

Defined in: packages/batch-delegate/src/createBatchDelegateFn.ts:7