UNPKG

582 BTypeScriptView Raw
1import { GraphQLResolveInfo } from 'graphql';
2export interface MiddlewareContext<TSource = any, TContext = any, TArgs = {
3 [argName: string]: any;
4}> {
5 source: TSource;
6 args: TArgs;
7 context: TContext;
8 info: GraphQLResolveInfo;
9}
10export declare type NextFn<T = any> = () => Promise<T>;
11export interface FieldMiddleware<TSource = any, TContext = any, TArgs = {
12 [argName: string]: any;
13}, TOutput = any> {
14 (ctx: MiddlewareContext<TSource, TContext, TArgs>, next: NextFn): Promise<TOutput> | TOutput;
15}
16//# sourceMappingURL=field-middleware.interface.d.ts.map
\No newline at end of file