import { ObjectTypeDefinitionNode , InterfaceTypeDefinitionNode , EnumTypeDefinitionNode , UnionTypeDefinitionNode , ScalarTypeDefinitionNode , InputObjectTypeDefinitionNode , FieldDefinitionNode , GraphQLSchema , GraphQLInterfaceType , GraphQLEnumType , GraphQLUnionType , GraphQLScalarType , GraphQLInputObjectType , } from 'graphql' ; import { GraphQLFieldConfigExt , GraphQLObjectTypeExt , } from '../type/object' ; import { SchemaFactory } from './SchemaFactory' ; /**
 * Middleware is useful for manipulating how the SchemaFactory creates a schema.
 * Usage:
 *  - Provide a class that extends the FactoryMiddleware class to the SchemaFactory.
 *  - This is implemented as a class instead of an interface so that it can default
 *    middleware methods to the identity function.
 */ export class FactoryMiddleware { param _factory public onInit ( _factory ) { return ; } param _factory public beforeBuild ( _factory ) { return ; } param schema public afterBuild ( schema ) { return schema ; } param field public wrapObjectField ( _factory , _definition , _fieldDef , field ) { return field ; } param field public wrapInterfaceField ( _factory , _definition , _fieldDef , field ) { return field ; } param nodeMap return public wrapObjectType ( _factory , _definition , object ) { return object ; } /**
     * Wrap an interface type or interact with the factory.
     */ public wrapInterfaceType ( _factory , _definition , interfce ) { return interfce ; } /**
     * Wrap an enum type or interact with the factory.
     */ public wrapEnumType ( _factory , _definition , enm ) { return enm ; } /**
     * Wrap an union type or interact with the factory.
     */ public wrapUnionType ( _factory , _definition , union ) { return union ; } /**
     * Wrap an scalar type or interact with the factory.
     */ public wrapScalarType ( _factory , _definition , sclr ) { return sclr ; } /**
     * Wrap an input type or interact with the factory.
     */ public wrapInputType ( _factory , _definition , inpt ) { return inpt ; } }