FieldMiddleware


interface FieldMiddleware<TSource = any, TContext = any, TArgs = {
    [argName: string]: any;
}, TOutput = any> {
  (ctx: MiddlewareContext<TSource, TContext, TArgs>, next: NextFn<any>): Promise<TOutput> | TOutput
}

Methods

call signature


(ctx: MiddlewareContext<TSource, TContext, TArgs>, next: NextFn<any>): Promise<TOutput> | TOutput

Parameters

Option Type Description
ctx MiddlewareContext
next NextFn

Returns

Promise<TOutput> | TOutput