1 | ;
|
2 |
|
3 | Object.defineProperty(exports, "__esModule", {
|
4 | value: true
|
5 | });
|
6 | exports.concatAST = concatAST;
|
7 |
|
8 | var _flatMap = _interopRequireDefault(require("../polyfills/flatMap"));
|
9 |
|
10 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11 |
|
12 | /**
|
13 | * Provided a collection of ASTs, presumably each from different files,
|
14 | * concatenate the ASTs together into batched AST, useful for validating many
|
15 | * GraphQL source files which together represent one conceptual application.
|
16 | */
|
17 | function concatAST(asts) {
|
18 | return {
|
19 | kind: 'Document',
|
20 | definitions: (0, _flatMap.default)(asts, function (ast) {
|
21 | return ast.definitions;
|
22 | })
|
23 | };
|
24 | }
|