@nestjs/graphql
Version:
Nest - modern, fast, powerful node.js web framework (@graphql)
17 lines (16 loc) • 611 B
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.Context = Context;
require("reflect-metadata");
const gql_paramtype_enum_1 = require("../enums/gql-paramtype.enum");
const param_utils_1 = require("./param.utils");
/**
* Resolver method parameter decorator. Extracts the `Context`
* object from the underlying platform and populates the decorated
* parameter with the value of `Context`.
*
* @publicApi
*/
function Context(property, ...pipes) {
return (0, param_utils_1.createGqlPipesParamDecorator)(gql_paramtype_enum_1.GqlParamtype.CONTEXT)(property, ...pipes);
}
;