• Docs
  • API Reference
  • Classes
  • WrapQuery

Class: WrapQuery<TContext>

wrap/src.WrapQuery

Type parameters

NameType
TContextRecord<string, any>

Implements

  • Transform<WrapQueryTransformationContext, TContext>

Table of contents

Constructors

Methods

Constructors

constructor

new WrapQuery<TContext>(path, wrapper, extractor)

Type parameters

NameType
TContextRecord<string, any>

Parameters

NameType
pathstring[]
wrapperQueryWrapper
extractor(result: any) => any

Defined in

packages/wrap/src/transforms/WrapQuery.ts:18

Methods

transformRequest

transformRequest(originalRequest, _delegationContext, _transformationContext): ExecutionRequest<Record<string, any>, any, any, Record<string, any>>

Parameters

NameType
originalRequestExecutionRequest<Record<string, any>, any, any, Record<string, any>>
_delegationContextDelegationContext<TContext>
_transformationContextWrapQueryTransformationContext

Returns

ExecutionRequest<Record<string, any>, any, any, Record<string, any>>

Implementation of

Transform.transformRequest

Defined in

packages/wrap/src/transforms/WrapQuery.ts:24


transformResult

transformResult(originalResult, _delegationContext, _transformationContext): ExecutionResult<any, any>

Parameters

NameType
originalResultExecutionResult<any, any>
_delegationContextDelegationContext<TContext>
_transformationContextWrapQueryTransformationContext

Returns

ExecutionResult<any, any>

Implementation of

Transform.transformResult

Defined in

packages/wrap/src/transforms/WrapQuery.ts:65