UNPKG

graphql-compose-elasticsearch

Version:
30 lines 1.16 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAggBlockITC = void 0; const utils_1 = require("../../utils"); const AggRules_1 = require("./AggRules"); function getAggBlockITC(opts) { const name = (0, utils_1.getTypeName)('AggBlock', opts); const description = (0, utils_1.desc)(` The aggregations framework helps provide aggregated data based on a search query. It is based on simple building blocks called aggregations, that can be composed in order to build complex summaries of the data. [Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations.html) `); return opts.getOrCreateITC(name, () => ({ name, description, fields: { key: { type: 'String', description: 'FieldName in response for aggregation result', }, value: { type: () => (0, AggRules_1.getAggRulesITC)(opts), description: 'Aggregation rules', }, }, })); } exports.getAggBlockITC = getAggBlockITC; //# sourceMappingURL=AggBlock.js.map