The Guild LogoThe Guild Monogram
GraphQL Tools

GraphQL Tools

A set of utilities for faster GraphQL development

Get Started

@graphql-tools/batch-delegate#

Table of contents#

Interfaces#

  • BatchDelegateOptions
  • CreateBatchDelegateFnOptions

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:5


BatchDelegateOptionsFn#

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

Type parameters#

NameType
TContextRecord<string, any>
Kany

Type declaration#

▸ (batchDelegateOptions): IDelegateToSchemaOptions<TContext>

Parameters#
NameType
batchDelegateOptionsBatchDelegateOptions<TContext, K>
Returns#

IDelegateToSchemaOptions<TContext>

Defined in#

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

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:5


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<Record<string, any>, any>
dataLoaderOptions?Options<K, V, C>
valuesFromResults?(results: any, keys: readonly K[]) => V[]

Returns#

BatchDelegateFn<K>

Defined in#

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