UNPKG

719 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3var debugging_1 = require("../debugging");
4var get_directives_1 = require("../utils/get-directives");
5function transformUnion(schema, union) {
6 debugging_1.debugLog("[transformUnion] transformed union " + union.name);
7 var directives = get_directives_1.getDirectives(schema, union);
8 return {
9 name: union.name,
10 description: union.description || '',
11 possibleTypes: union.getTypes().map(function (type) { return type.name; }),
12 directives: directives,
13 usesDirectives: Object.keys(directives).length > 0
14 };
15}
16exports.transformUnion = transformUnion;
17//# sourceMappingURL=transform-union.js.map
\No newline at end of file