Documentation
API Reference
Classes
RenameObjectFields

graphql-tools-monorepo / wrap/src / 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): RenameObjectFields<TContext>

Type parameters

NameType
TContextRecord<string, any>

Parameters

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

Returns

RenameObjectFields<TContext>

Defined in

packages/wrap/src/transforms/RenameObjectFields.ts:13

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

Returns

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

Implementation of

Transform.transformRequest

Defined in

packages/wrap/src/transforms/RenameObjectFields.ts:35


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:28