UNPKG

982 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3const types_1 = require("./types");
4const constructors_1 = require("./constructors");
5const dependencies_1 = require("./dependencies");
6const dependencyImports_1 = require("./dependencyImports");
7const stringDeclarations_1 = require("./stringDeclarations");
8exports.operationFile = (operation, outputPath, globalSourcePath, context) => ((dependencies) => [
9 ...dependencyImports_1.default(dependencies, outputPath, globalSourcePath, context),
10 ...stringDeclarations_1.default(operation.operationName, operation.filePath, outputPath, dependencies.fragments.map(fragmentDependency => fragmentDependency.name)),
11 types_1.exportDeclaration(types_1.typeAliasDeclarationForOperation(operation)),
12 types_1.exportDeclaration(constructors_1.constructorDeclarationForOperation(operation))
13])(dependencies_1.default(operation.selectionSet, operation.variables));
14//# sourceMappingURL=operationFile.js.map
\No newline at end of file