Docs
API Reference
Classes
RenameObjectFields

Class: RenameObjectFields<TContext>

wrap/src.RenameObjectFields

Type parameters

NameType
TContextRecord<string, any>

Implements

  • Transform<RenameObjectFieldsTransformationContext, TContext>

Table of contents

Constructors

Methods

Constructors

constructor

new RenameObjectFields<TContext>(renamer)

Type parameters

NameType
TContextRecord<string, any>

Parameters

NameType
renamer(typeName: string, fieldName: string, fieldConfig: GraphQLFieldConfig<any, any, any>) => string

Defined in

packages/wrap/src/transforms/RenameObjectFields.ts:16 (opens in a new tab)

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

Returns

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

Implementation of

Transform.transformRequest

Defined in

packages/wrap/src/transforms/RenameObjectFields.ts:32 (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/RenameObjectFields.ts:25 (opens in a new tab)