Catch the highlights of GraphQLConf 2023! Click for recordings. Or check out our recap blog post.
Docs
API Reference
Classes
WrapFields

graphql-tools-monorepo / wrap/src / WrapFields

Class: WrapFields<TContext>

wrap/src.WrapFields

Type parameters

NameType
TContextextends Record<string, any>

Implements

  • Transform<WrapFieldsTransformationContext, TContext>

Table of contents

Constructors

Methods

Constructors

constructor

new WrapFields<TContext>(outerTypeName, wrappingFieldNames, wrappingTypeNames, fieldNames?, prefix?): WrapFields<TContext>

Type parameters

NameType
TContextextends Record<string, any>

Parameters

NameTypeDefault value
outerTypeNamestringundefined
wrappingFieldNamesstring[]undefined
wrappingTypeNamesstring[]undefined
fieldNames?string[]undefined
prefixstring'gqtld'

Returns

WrapFields<TContext>

Defined in

packages/wrap/src/transforms/WrapFields.ts:47

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>
transformationContextWrapFieldsTransformationContext

Returns

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

Implementation of

Transform.transformRequest

Defined in

packages/wrap/src/transforms/WrapFields.ts:188


transformResult

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

Parameters

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

Returns

ExecutionResult<any, any>

Implementation of

Transform.transformResult

Defined in

packages/wrap/src/transforms/WrapFields.ts:202


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/WrapFields.ts:89