1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | var debugging_1 = require("../debugging");
|
4 | var get_directives_1 = require("../utils/get-directives");
|
5 | function 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 | }
|
16 | exports.transformUnion = transformUnion;
|
17 |
|
\ | No newline at end of file |