1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | const types_1 = require("./types");
|
4 | const constructors_1 = require("./constructors");
|
5 | const dependencies_1 = require("./dependencies");
|
6 | const dependencyImports_1 = require("./dependencyImports");
|
7 | const stringDeclarations_1 = require("./stringDeclarations");
|
8 | exports.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 |
|
\ | No newline at end of file |