UNPKG

@nestjs/graphql

Version:

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

15 lines (14 loc) 587 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.applyFieldDecorators = applyFieldDecorators; const decorators_1 = require("../decorators"); function applyFieldDecorators(targetClass, item) { if (item.extensions && Object.keys(item.extensions).length > 0) { (0, decorators_1.Extensions)(item.extensions)(targetClass.prototype, item.name); } if (item.directives?.length) { item.directives.forEach((directive) => { (0, decorators_1.Directive)(directive.sdl)(targetClass.prototype, item.name); }); } }