wrap_src.hoistfield

Class: HoistField#

wrap/src.HoistField

Hierarchy#

  • HoistField

Implements#

Table of contents#

Constructors#

Methods#

Constructors#

constructor#

+ new HoistField(typeName: string, pathConfig: (string | { argFilter?: (arg: GraphQLArgument) => boolean ; fieldName: string })[], newFieldName: string, alias?: string): HoistField

Parameters:#

NameTypeDefault value
typeNamestring-
pathConfig(string{ argFilter?: (arg: GraphQLArgument) => boolean ; fieldName: string })[]
newFieldNamestring-
aliasstring'__gqtlw__'

Returns: HoistField

Defined in: packages/wrap/src/transforms/HoistField.ts:27

Methods#

transformRequest#

transformRequest(originalRequest: Request, delegationContext: DelegationContext, transformationContext: Record<string, any\>): Request

Parameters:#

NameType
originalRequestRequest
delegationContextDelegationContext
transformationContextRecord<string, any\>

Returns: Request

Defined in: packages/wrap/src/transforms/HoistField.ts:145


transformResult#

transformResult(originalResult: ExecutionResult<Record<string, any\>\>, delegationContext: DelegationContext, transformationContext: Record<string, any\>): ExecutionResult<Record<string, any\>\>

Parameters:#

NameType
originalResultExecutionResult<Record<string, any\>\>
delegationContextDelegationContext
transformationContextRecord<string, any\>

Returns: ExecutionResult<Record<string, any\>\>

Defined in: packages/wrap/src/transforms/HoistField.ts:153


transformSchema#

transformSchema(originalWrappingSchema: GraphQLSchema, subschemaConfig: SubschemaConfig<any, any, any\>, transformedSchema?: GraphQLSchema): GraphQLSchema

Parameters:#

NameType
originalWrappingSchemaGraphQLSchema
subschemaConfigSubschemaConfig<any, any, any\>
transformedSchema?GraphQLSchema

Returns: GraphQLSchema

Defined in: packages/wrap/src/transforms/HoistField.ts:67