@terabits/grapi
Version:
Grapi Schema Generator For GraphQL Server
37 lines (36 loc) • 1.22 kB
JavaScript
;
exports.__esModule = true;
var SdlObjectType = (function () {
function SdlObjectType(_a) {
var name = _a.name, description = _a.description, interfaces = _a.interfaces, directives = _a.directives, fields = _a.fields, typeDef = _a.typeDef;
this.name = name;
this.description = description;
this.interfaces = interfaces || [];
this.directives = directives || {};
this.fields = fields || {};
this.typeDef = typeDef;
}
SdlObjectType.prototype.getName = function () {
return this.name;
};
SdlObjectType.prototype.getField = function (name) {
return this.fields[name];
};
SdlObjectType.prototype.getFields = function () {
return this.fields;
};
SdlObjectType.prototype.getDescription = function () {
return this.description;
};
SdlObjectType.prototype.getInterfaces = function () {
return this.interfaces;
};
SdlObjectType.prototype.getDirectives = function () {
return this.directives;
};
SdlObjectType.prototype.getTypeDef = function () {
return this.typeDef;
};
return SdlObjectType;
}());
exports["default"] = SdlObjectType;