1 | import { GraphQLSchema, FieldNode } from 'graphql';
|
2 | import { Transform, Request, ExecutionResult } from '@graphql-tools/utils';
|
3 | export default class HoistField implements Transform {
|
4 | private readonly typeName;
|
5 | private readonly newFieldName;
|
6 | private readonly pathToField;
|
7 | private readonly oldFieldName;
|
8 | private readonly transformer;
|
9 | constructor(typeName: string, path: Array<string>, newFieldName: string, alias?: string);
|
10 | transformSchema(schema: GraphQLSchema): GraphQLSchema;
|
11 | transformRequest(originalRequest: Request, delegationContext?: Record<string, any>, transformationContext?: Record<string, any>): Request;
|
12 | transformResult(originalResult: ExecutionResult, delegationContext?: Record<string, any>, transformationContext?: Record<string, any>): ExecutionResult;
|
13 | }
|
14 | export declare function wrapFieldNode(fieldNode: FieldNode, path: Array<string>, alias: string): FieldNode;
|
15 | export declare function unwrapValue(originalValue: any, alias: string): any;
|