graphql-tools-monorepo / wrap/src / WrapQuery
Class: WrapQuery<TContext>
wrap/src.WrapQuery
Type parameters
| Name | Type | 
|---|---|
TContext | Record<string, any> | 
Implements
Transform<WrapQueryTransformationContext,TContext>
Table of contents
Constructors
Methods
Constructors
constructor
• new WrapQuery<TContext>(path, wrapper, extractor): WrapQuery<TContext>
Type parameters
| Name | Type | 
|---|---|
TContext | Record<string, any> | 
Parameters
| Name | Type | 
|---|---|
path | string[] | 
wrapper | QueryWrapper | 
extractor | (result: any) => any | 
Returns
WrapQuery<TContext>
Defined in
packages/wrap/src/transforms/WrapQuery.ts:16
Methods
transformRequest
▸ transformRequest(originalRequest, _delegationContext, _transformationContext): ExecutionRequest<any, any, any, Record<string, any>, any>
Parameters
| Name | Type | 
|---|---|
originalRequest | ExecutionRequest<any, any, any, Record<string, any>, any> | 
_delegationContext | DelegationContext<TContext> | 
_transformationContext | WrapQueryTransformationContext | 
Returns
ExecutionRequest<any, any, any, Record<string, any>, any>
Implementation of
Transform.transformRequest
Defined in
packages/wrap/src/transforms/WrapQuery.ts:22
transformResult
▸ transformResult(originalResult, _delegationContext, _transformationContext): ExecutionResult<any, any>
Parameters
| Name | Type | 
|---|---|
originalResult | ExecutionResult<any, any> | 
_delegationContext | DelegationContext<TContext> | 
_transformationContext | WrapQueryTransformationContext | 
Returns
ExecutionResult<any, any>
Implementation of
Transform.transformResult