import { ArgumentsHost, ExecutionContext } from '@nestjs/common'; import { Request, Response } from 'express'; import { GraphQLResolveInfo } from 'graphql'; export interface RestContext { req: Request; res: Response; isGraphQL: false; info: undefined; } export interface GraphQLContext { req: Request; res: Response; isGraphQL: true; info: GraphQLResolveInfo; } /** * Parses in the Nest ExecutionContext of the incoming request, accounting for both * GraphQL & REST requests. * 解析传入请求的Nest ExecutionContext,包含GraphQL和REST请求。 */ export declare function parseContext(context: ExecutionContext | ArgumentsHost): RestContext | GraphQLContext;