UNPKG

975 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.getOperationManifestFromProject = void 0;
4const apollo_graphql_1 = require("apollo-graphql");
5function getOperationManifestFromProject(project, options = {
6 preserveStringAndNumericLiterals: false
7}) {
8 const manifest = Object.entries(project.mergedOperationsAndFragmentsForService).map(([operationName, operationAST]) => {
9 const printed = apollo_graphql_1.operationRegistrySignature(operationAST, operationName, {
10 preserveStringAndNumericLiterals: options.preserveStringAndNumericLiterals
11 });
12 return {
13 signature: apollo_graphql_1.operationHash(printed),
14 document: printed,
15 metadata: {
16 engineSignature: ""
17 }
18 };
19 });
20 return manifest;
21}
22exports.getOperationManifestFromProject = getOperationManifestFromProject;
23//# sourceMappingURL=getOperationManifestFromProject.js.map
\No newline at end of file