UNPKG

@zuu/owl

Version:

Zuu's Experimental GraphQL Implementation

29 lines 998 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const findType_1 = require("./findType"); const errors_1 = require("../errors"); function getHandlerInfo(prototype, propertyKey, returnTypeFunc, options = {}) { if (typeof propertyKey === "symbol") { throw new errors_1.SymbolKeysNotSupportedError(); } const { getType, typeOptions } = findType_1.findType({ metadataKey: "design:returntype", prototype, propertyKey, returnTypeFunc, typeOptions: options, }); const methodName = propertyKey; return { methodName, schemaName: options.name || methodName, handler: prototype[methodName], target: prototype.constructor, getReturnType: getType, returnTypeOptions: typeOptions, description: options.description, deprecationReason: options.deprecationReason, }; } exports.getHandlerInfo = getHandlerInfo; //# sourceMappingURL=handlers.js.map