UNPKG

@terabits/grapi

Version:

Grapi Schema Generator For GraphQL Server

106 lines (105 loc) 3.97 kB
"use strict"; var __extends = (this && this.__extends) || (function () { var extendStatics = function (d, b) { extendStatics = Object.setPrototypeOf || ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; return extendStatics(d, b); }; return function (d, b) { if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null"); extendStatics(d, b); function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; })(); var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; exports.__esModule = true; exports.ObjectValue = exports.ListValue = exports.EnumValue = exports.NullValue = exports.BooleanValue = exports.StringValue = exports.FloatValue = exports.IntValue = void 0; var graphql_1 = require("graphql"); var simpleValue_1 = __importDefault(require("./simpleValue")); var IntValue = (function (_super) { __extends(IntValue, _super); function IntValue() { return _super !== null && _super.apply(this, arguments) || this; } IntValue.prototype.getType = function () { return graphql_1.Kind.INT; }; return IntValue; }(simpleValue_1["default"])); exports.IntValue = IntValue; var FloatValue = (function (_super) { __extends(FloatValue, _super); function FloatValue() { return _super !== null && _super.apply(this, arguments) || this; } FloatValue.prototype.getType = function () { return graphql_1.Kind.FLOAT; }; return FloatValue; }(simpleValue_1["default"])); exports.FloatValue = FloatValue; var StringValue = (function (_super) { __extends(StringValue, _super); function StringValue() { return _super !== null && _super.apply(this, arguments) || this; } StringValue.prototype.getType = function () { return graphql_1.Kind.STRING; }; return StringValue; }(simpleValue_1["default"])); exports.StringValue = StringValue; var BooleanValue = (function (_super) { __extends(BooleanValue, _super); function BooleanValue() { return _super !== null && _super.apply(this, arguments) || this; } BooleanValue.prototype.getType = function () { return graphql_1.Kind.BOOLEAN; }; return BooleanValue; }(simpleValue_1["default"])); exports.BooleanValue = BooleanValue; var NullValue = (function (_super) { __extends(NullValue, _super); function NullValue() { return _super.call(this, { value: null }) || this; } NullValue.prototype.getType = function () { return graphql_1.Kind.NULL; }; NullValue.prototype.getValue = function () { return null; }; return NullValue; }(simpleValue_1["default"])); exports.NullValue = NullValue; var EnumValue = (function (_super) { __extends(EnumValue, _super); function EnumValue() { return _super !== null && _super.apply(this, arguments) || this; } EnumValue.prototype.getType = function () { return graphql_1.Kind.ENUM; }; return EnumValue; }(simpleValue_1["default"])); exports.EnumValue = EnumValue; var listValue_1 = require("./listValue"); __createBinding(exports, listValue_1, "default", "ListValue"); var objectValue_1 = require("./objectValue"); __createBinding(exports, objectValue_1, "default", "ObjectValue");