1 | import { GraphQLSchema, GraphQLFieldResolver, BuildSchemaOptions, GraphQLInputFieldConfig, GraphQLFieldConfig, FieldNode, FragmentDefinitionNode, SelectionNode, ObjectFieldNode, ObjectValueNode, GraphQLError, GraphQLEnumValueConfig } from 'graphql';
|
2 | import { Executor, Subscriber, DelegationContext } from '@graphql-tools/delegate';
|
3 | import { Request } from '@graphql-tools/utils';
|
4 | export interface IMakeRemoteExecutableSchemaOptions {
|
5 | schema: GraphQLSchema | string;
|
6 | executor?: Executor;
|
7 | subscriber?: Subscriber;
|
8 | createResolver?: (executor: Executor, subscriber: Subscriber) => GraphQLFieldResolver<any, any>;
|
9 | buildSchemaOptions?: BuildSchemaOptions;
|
10 | }
|
11 | export declare type InputFieldTransformer = (typeName: string, fieldName: string, inputFieldConfig: GraphQLInputFieldConfig) => GraphQLInputFieldConfig | [string, GraphQLInputFieldConfig] | null | undefined;
|
12 | export declare type InputFieldNodeTransformer = (typeName: string, fieldName: string, inputFieldNode: ObjectFieldNode, request: Request, delegationContext?: DelegationContext) => ObjectFieldNode | Array<ObjectFieldNode>;
|
13 | export declare type InputObjectNodeTransformer = (typeName: string, inputObjectNode: ObjectValueNode, request: Request, delegationContext?: DelegationContext) => ObjectValueNode;
|
14 | export declare type FieldTransformer = (typeName: string, fieldName: string, fieldConfig: GraphQLFieldConfig<any, any>) => GraphQLFieldConfig<any, any> | [string, GraphQLFieldConfig<any, any>] | null | undefined;
|
15 | export declare type RootFieldTransformer = (operation: 'Query' | 'Mutation' | 'Subscription', fieldName: string, fieldConfig: GraphQLFieldConfig<any, any>) => GraphQLFieldConfig<any, any> | [string, GraphQLFieldConfig<any, any>] | null | undefined;
|
16 | export declare type EnumValueTransformer = (typeName: string, externalValue: string, enumValueConfig: GraphQLEnumValueConfig) => GraphQLEnumValueConfig | [string, GraphQLEnumValueConfig] | null | undefined;
|
17 | export declare type FieldNodeTransformer = (typeName: string, fieldName: string, fieldNode: FieldNode, fragments: Record<string, FragmentDefinitionNode>, transformationContext: Record<string, any>) => SelectionNode | Array<SelectionNode>;
|
18 | export declare type LeafValueTransformer = (typeName: string, value: any) => any;
|
19 | export declare type DataTransformer = (value: any, transformationContext?: Record<string, any>) => any;
|
20 | export declare type ObjectValueTransformerMap = Record<string, DataTransformer>;
|
21 | export declare type ErrorsTransformer = (errors: ReadonlyArray<GraphQLError>, transformationContext: Record<string, any>) => Array<GraphQLError>;
|