UNPKG

@ephys/graphql-joi-directives

Version:

Adds Joi-powered constraint directive for GraphQL

28 lines (27 loc) 2.2 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.joiContraintDirectivesTypedefs = exports.joiConstraintDirectives = exports.buildJoiListDirectiveTypedef = exports.buildJoiFloatDirectiveTypedef = exports.buildJoiIntDirectiveTypedef = exports.buildJoiStrDirectiveTypedef = exports.buildJoiListDirective = exports.buildJoiFloatDirective = exports.buildJoiIntDirective = exports.buildJoiStrDirective = void 0; const float_1 = require("./float"); Object.defineProperty(exports, "buildJoiFloatDirective", { enumerable: true, get: function () { return float_1.buildJoiFloatDirective; } }); Object.defineProperty(exports, "buildJoiFloatDirectiveTypedef", { enumerable: true, get: function () { return float_1.buildJoiFloatDirectiveTypedef; } }); const int_1 = require("./int"); Object.defineProperty(exports, "buildJoiIntDirective", { enumerable: true, get: function () { return int_1.buildJoiIntDirective; } }); Object.defineProperty(exports, "buildJoiIntDirectiveTypedef", { enumerable: true, get: function () { return int_1.buildJoiIntDirectiveTypedef; } }); const list_1 = require("./list"); Object.defineProperty(exports, "buildJoiListDirective", { enumerable: true, get: function () { return list_1.buildJoiListDirective; } }); Object.defineProperty(exports, "buildJoiListDirectiveTypedef", { enumerable: true, get: function () { return list_1.buildJoiListDirectiveTypedef; } }); const str_1 = require("./str"); Object.defineProperty(exports, "buildJoiStrDirective", { enumerable: true, get: function () { return str_1.buildJoiStrDirective; } }); Object.defineProperty(exports, "buildJoiStrDirectiveTypedef", { enumerable: true, get: function () { return str_1.buildJoiStrDirectiveTypedef; } }); exports.joiConstraintDirectives = { str: str_1.buildJoiStrDirective('str'), int: int_1.buildJoiIntDirective('int'), float: float_1.buildJoiFloatDirective('float'), list: list_1.buildJoiListDirective('list'), }; exports.joiContraintDirectivesTypedefs = [ str_1.buildJoiStrDirectiveTypedef('str'), int_1.buildJoiIntDirectiveTypedef('int'), float_1.buildJoiFloatDirectiveTypedef('float'), list_1.buildJoiListDirectiveTypedef('list'), ];