@grapi/server
Version:
Grapi Schema Generator For GraphQL Server
41 lines (40 loc) • 926 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class SdlObjectType {
name;
typeDef;
description;
interfaces;
directives;
fields;
constructor({ name, description, interfaces, directives, fields, typeDef, }) {
this.name = name;
this.description = description;
this.interfaces = interfaces || [];
this.directives = directives || {};
this.fields = fields || {};
this.typeDef = typeDef;
}
getName() {
return this.name;
}
getField(name) {
return this.fields[name];
}
getFields() {
return this.fields;
}
getDescription() {
return this.description;
}
getInterfaces() {
return this.interfaces;
}
getDirectives() {
return this.directives;
}
getTypeDef() {
return this.typeDef;
}
}
exports.default = SdlObjectType;