1 | import { SelectionNode, SelectionSetNode } from 'graphql';
|
2 | import { Request, ExecutionResult } from '@graphql-tools/utils';
|
3 | import { Transform, DelegationContext } from '@graphql-tools/delegate';
|
4 | export declare type QueryWrapper = (subtree: SelectionSetNode) => SelectionNode | SelectionSetNode;
|
5 | export default class WrapQuery implements Transform {
|
6 | private readonly wrapper;
|
7 | private readonly extractor;
|
8 | private readonly path;
|
9 | constructor(path: Array<string>, wrapper: QueryWrapper, extractor: (result: any) => any);
|
10 | transformRequest(originalRequest: Request, _delegationContext: DelegationContext, _transformationContext: Record<string, any>): Request;
|
11 | transformResult(originalResult: ExecutionResult, _delegationContext: DelegationContext, _transformationContext: Record<string, any>): ExecutionResult;
|
12 | }
|