graphql-tools-monorepo / wrap/src / HoistField
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?
): HoistField
<TContext
>
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__' |
Returns
HoistField
<TContext
>
Defined in
packages/wrap/src/transforms/HoistField.ts:44
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 | HoistFieldTransformationContext |
Returns
ExecutionRequest
<any
, any
, any
, Record
<string
, any
>, any
>
Implementation of
Transform.transformRequest
Defined in
packages/wrap/src/transforms/HoistField.ts:194
transformResult
▸ transformResult(originalResult
, delegationContext
, transformationContext
): ExecutionResult
<any
, any
>
Parameters
Name | Type |
---|---|
originalResult | ExecutionResult <any , any > |
delegationContext | DelegationContext <TContext > |
transformationContext | HoistFieldTransformationContext |
Returns
ExecutionResult
<any
, any
>
Implementation of
Transform.transformResult
Defined in
packages/wrap/src/transforms/HoistField.ts:206
transformSchema
▸ transformSchema(originalWrappingSchema
, subschemaConfig
): GraphQLSchema
Parameters
Name | Type |
---|---|
originalWrappingSchema | GraphQLSchema |
subschemaConfig | SubschemaConfig <any , any , any , TContext > |
Returns
GraphQLSchema
Implementation of
Transform.transformSchema