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) => {
|
9 | const dependencies = dependencies_1.default(operation.selectionSet, operation.variables);
|
10 | return [
|
11 | ...dependencyImports_1.default(dependencies, outputPath, globalSourcePath, context),
|
12 | ...stringDeclarations_1.default(operation.operationName, operation.filePath, outputPath, dependencies.fragments.map(fragmentDependency => fragmentDependency.name)),
|
13 | types_1.exportDeclaration(types_1.typeAliasDeclarationForOperation(operation)),
|
14 | types_1.exportDeclaration(constructors_1.constructorDeclarationForOperation(operation))
|
15 | ];
|
16 | };
|
17 |
|
\ | No newline at end of file |