UNPKG

graphql-compose-elasticsearch

Version:
27 lines 1.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getNestedITC = void 0; const Query_1 = require("../Query"); const utils_1 = require("../../../utils"); function getNestedITC(opts) { const name = (0, utils_1.getTypeName)('QueryNested', opts); const description = (0, utils_1.desc)(` Nested query allows to query nested objects / docs. The query is executed against the nested objects / docs as if they were indexed as separate docs. [Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-nested-query.html) `); return opts.getOrCreateITC(name, () => ({ name, description, fields: { path: 'String', score_mode: { type: 'String', description: 'Can be: `avg`, `sum`, `max`, `min`, `none`.', }, query: () => (0, Query_1.getQueryITC)(opts), }, })); } exports.getNestedITC = getNestedITC; //# sourceMappingURL=Nested.js.map