graphql-tools-monorepo / wrap/src / RenameRootFields
Class: RenameRootFields<TContext>
wrap/src.RenameRootFields
Type parameters
| Name | Type | 
|---|---|
TContext | Record<string, any> | 
Implements
Transform<RenameRootFieldsTransformationContext,TContext>
Table of contents
Constructors
Methods
Constructors
constructor
• new RenameRootFields<TContext>(renamer): RenameRootFields<TContext>
Type parameters
| Name | Type | 
|---|---|
TContext | Record<string, any> | 
Parameters
| Name | Type | 
|---|---|
renamer | (operation: "Query" | "Mutation" | "Subscription", name: string, fieldConfig: GraphQLFieldConfig<any, any, any>) => string | 
Returns
RenameRootFields<TContext>
Defined in
packages/wrap/src/transforms/RenameRootFields.ts:13
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 | RenameRootFieldsTransformationContext | 
Returns
ExecutionRequest<any, any, any, Record<string, any>, any>
Implementation of
Transform.transformRequest
Defined in
packages/wrap/src/transforms/RenameRootFields.ts:36
transformSchema
▸ transformSchema(originalWrappingSchema, subschemaConfig): GraphQLSchema
Parameters
| Name | Type | 
|---|---|
originalWrappingSchema | GraphQLSchema | 
subschemaConfig | SubschemaConfig<any, any, any, TContext> | 
Returns
GraphQLSchema
Implementation of
Transform.transformSchema