UNPKG

@nestjs/graphql

Version:

Nest - modern, fast, powerful node.js web framework (@graphql)

14 lines (13 loc) 483 B
import 'reflect-metadata'; import { GqlParamtype } from '../enums/gql-paramtype.enum.js'; import { createGqlPipesParamDecorator } from './param.utils.js'; /** * Resolver method parameter decorator. Extracts the `Context` * object from the underlying platform and populates the decorated * parameter with the value of `Context`. * * @publicApi */ export function Context(property, ...pipes) { return createGqlPipesParamDecorator(GqlParamtype.CONTEXT)(property, ...pipes); }