graphql-compose-elasticsearch
Version:
Elastic search via GraphQL
25 lines • 1 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPercolateITC = void 0;
const utils_1 = require("../../../utils");
const FieldNames_1 = require("../../Commons/FieldNames");
function getPercolateITC(opts) {
const name = (0, utils_1.getTypeName)('QueryPercolate', opts);
const description = (0, utils_1.desc)(`
The percolate query can be used to match queries stored in an index.
The percolate query itself contains the document that will be used
as query to match with the stored queries.
[Documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/query-dsl-percolate-query.html)
`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
field: (0, FieldNames_1.getPercolatorFields)(opts),
document_type: 'String!',
document: 'JSON!',
},
}));
}
exports.getPercolateITC = getPercolateITC;
//# sourceMappingURL=Percolate.js.map