Class: HoistField<TContext>
wrap/src.HoistField
Type parameters
| Name | Type |
|---|---|
TContext | extends 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
| Name | Type |
|---|---|
TContext | extends Record<string, any> = Record<string, any> |
Parameters
| Name | Type | Default value |
|---|---|---|
typeName | string | undefined |
pathConfig | (string | { argFilter?: (arg: GraphQLArgument) => boolean ; fieldName: string })[] | undefined |
newFieldName | string | undefined |
alias | string | '__gqtlw__' |
Defined in
packages/wrap/src/transforms/HoistField.ts:40
Methods
transformRequest
▸ transformRequest(originalRequest, delegationContext, transformationContext): ExecutionRequest<Record<string, any>, any, any, Record<string, any>>
Parameters
| Name | Type |
|---|---|
originalRequest | ExecutionRequest<Record<string, any>, any, any, Record<string, any>> |
delegationContext | DelegationContext<TContext> |
transformationContext | HoistFieldTransformationContext |
Returns
ExecutionRequest<Record<string, any>, any, any, Record<string, any>>
Implementation of
Transform.transformRequest
Defined in
packages/wrap/src/transforms/HoistField.ts:162
transformResult
▸ transformResult(originalResult, delegationContext, transformationContext): ExecutionResult<Record<string, any>>
Parameters
| Name | Type |
|---|---|
originalResult | ExecutionResult<Record<string, any>> |
delegationContext | DelegationContext<TContext> |
transformationContext | HoistFieldTransformationContext |
Returns
ExecutionResult<Record<string, any>>
Implementation of
Transform.transformResult
Defined in
packages/wrap/src/transforms/HoistField.ts:170
transformSchema
▸ transformSchema(originalWrappingSchema, subschemaConfig): GraphQLSchema
Parameters
| Name | Type |
|---|---|
originalWrappingSchema | GraphQLSchema |
subschemaConfig | SubschemaConfig<any, any, any, TContext> |
Returns
GraphQLSchema
Implementation of
Transform.transformSchema