Page Contents

Home > @loopback/graphql > GraphQLMiddleware

GraphQLMiddleware type

A GraphQL middleware function or class.

type-graphql declares this type as Middleware but does not export it from the package entry point, so it is declared here to match type-graphql/build/typings/typings/middleware.

Signature:

export type GraphQLMiddleware<TContext extends object = object> = MiddlewareFn<TContext> | (new (...args: any[]) => MiddlewareInterface<TContext>);