Docs
API Reference
Classes
HoistField

Class: HoistField<TContext>

wrap/src.HoistField

Type parameters

NameType
TContextextends Record<string, any> = Record<string, any>

Implements

  • Transform<HoistFieldTransformationContext, TContext>

Table of contents

Constructors

Methods

Constructors

constructor

new HoistField<TContext>(typeName, pathConfig, newFieldName, alias?)

Type parameters

NameType
TContextextends Record<string, any> = Record<string, any>

Parameters

NameTypeDefault value
typeNamestringundefined
pathConfig(string | { argFilter?: (arg: GraphQLArgument) => boolean ; fieldName: string })[]undefined
newFieldNamestringundefined
aliasstring'__gqtlw__'

Defined in

packages/wrap/src/transforms/HoistField.ts:43 (opens in a new tab)

Methods

transformRequest

transformRequest(originalRequest, delegationContext, transformationContext): ExecutionRequest<any, any, any, Record<string, any>, any>

Parameters

NameType
originalRequestExecutionRequest<any, any, any, Record<string, any>, any>
delegationContextDelegationContext<TContext>
transformationContextHoistFieldTransformationContext

Returns

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

Implementation of

Transform.transformRequest

Defined in

packages/wrap/src/transforms/HoistField.ts:183 (opens in a new tab)


transformResult

transformResult(originalResult, delegationContext, transformationContext): ExecutionResult<any, any>

Parameters

NameType
originalResultExecutionResult<any, any>
delegationContextDelegationContext<TContext>
transformationContextHoistFieldTransformationContext

Returns

ExecutionResult<any, any>

Implementation of

Transform.transformResult

Defined in

packages/wrap/src/transforms/HoistField.ts:191 (opens in a new tab)


transformSchema

transformSchema(originalWrappingSchema, subschemaConfig): GraphQLSchema

Parameters

NameType
originalWrappingSchemaGraphQLSchema
subschemaConfigSubschemaConfig<any, any, any, TContext>

Returns

GraphQLSchema

Implementation of

Transform.transformSchema

Defined in

packages/wrap/src/transforms/HoistField.ts:85 (opens in a new tab)