UNPKG

574 BTypeScriptView Raw
1import { GraphQLSchema, GraphQLField, GraphQLFieldConfig } from 'graphql';
2import { Transform } from './transforms';
3export declare type RootTransformer = (operation: 'Query' | 'Mutation' | 'Subscription', fieldName: string, field: GraphQLField<any, any>) => GraphQLFieldConfig<any, any> | {
4 name: string;
5 field: GraphQLFieldConfig<any, any>;
6} | null | undefined;
7export default class TransformRootFields implements Transform {
8 private transform;
9 constructor(transform: RootTransformer);
10 transformSchema(originalSchema: GraphQLSchema): GraphQLSchema;
11}