UNPKG

620 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.Context = void 0;
4require("reflect-metadata");
5const gql_paramtype_enum_1 = require("../enums/gql-paramtype.enum");
6const param_utils_1 = require("./param.utils");
7/**
8 * Resolver method parameter decorator. Extracts the `Context`
9 * object from the underlying platform and populates the decorated
10 * parameter with the value of `Context`.
11 */
12function Context(property, ...pipes) {
13 return (0, param_utils_1.createGqlPipesParamDecorator)(gql_paramtype_enum_1.GqlParamtype.CONTEXT)(property, ...pipes);
14}
15exports.Context = Context;