UNPKG

@grapi/server

Version:

Grapi Schema Generator For GraphQL Server

26 lines (25 loc) 570 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class EnumType { description; name; values; constructor({ name, values, description }) { this.name = name; this.values = values; this.description = description; } getTypename() { return this.name; } getValues() { return this.values; } getDescription() { return this.description; } getTypeDef() { return `enum ${this.name} { ${this.values.join(' ')} }`; } } exports.default = EnumType;