graphql-compose-elasticsearch
Version:
Elastic search via GraphQL
35 lines • 1.17 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getFloatRangeKeyedITC = exports.getFloatRangeITC = void 0;
const utils_1 = require("../../utils");
function getFloatRangeITC(opts) {
const name = (0, utils_1.getTypeName)('FloatRange', opts);
const description = (0, utils_1.desc)(`Float range where \`from\` value includes and \`to\` value excludes.`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
from: 'Float',
to: 'Float',
},
}));
}
exports.getFloatRangeITC = getFloatRangeITC;
function getFloatRangeKeyedITC(opts) {
const name = (0, utils_1.getTypeName)('FloatRangeKeyed', opts);
const description = (0, utils_1.desc)(`
Float range where \`from\` value includes and \`to\` value excludes and
may have a key for aggregation.
`);
return opts.getOrCreateITC(name, () => ({
name,
description,
fields: {
from: 'Float',
to: 'Float',
key: 'String',
},
}));
}
exports.getFloatRangeKeyedITC = getFloatRangeKeyedITC;
//# sourceMappingURL=Float.js.map