1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.getOperationManifestFromProject = void 0;
|
4 | const apollo_graphql_1 = require("apollo-graphql");
|
5 | function 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 | }
|
22 | exports.getOperationManifestFromProject = getOperationManifestFromProject;
|
23 |
|
\ | No newline at end of file |