apollo
Version:
Command line tool for Apollo GraphQL
23 lines • 989 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getOperationManifestFromProject = void 0;
const apollo_graphql_1 = require("apollo-graphql");
function getOperationManifestFromProject(project, options = {
preserveStringAndNumericLiterals: false,
}) {
const manifest = Object.entries(project.mergedOperationsAndFragmentsForService).map(([operationName, operationAST]) => {
const printed = (0, apollo_graphql_1.operationRegistrySignature)(operationAST, operationName, {
preserveStringAndNumericLiterals: options.preserveStringAndNumericLiterals,
});
return {
signature: (0, apollo_graphql_1.operationHash)(printed),
document: printed,
metadata: {
engineSignature: "",
},
};
});
return manifest;
}
exports.getOperationManifestFromProject = getOperationManifestFromProject;
//# sourceMappingURL=getOperationManifestFromProject.js.map