graphql-composer
Version:
Create your GraphQL API using composition!
40 lines • 1.08 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.GQLElement = void 0;
const helpers_1 = require("../helpers");
const Buildable_1 = require("./Buildable");
class GQLElement extends Buildable_1.Buildable {
constructor(name) {
super();
this._directives = [];
this.setName(name);
}
get definitionNode() {
return undefined;
}
get description() {
return this._description;
}
get name() {
return this._name;
}
get directives() {
return this._directives;
}
setName(name) {
this._name = name;
return this;
}
setDirectives(...directives) {
this._directives = directives;
return this;
}
addDirectives(...directives) {
return this.setDirectives(...this.directives, ...directives);
}
removeDirectives(...directives) {
return this.setDirectives(...helpers_1.ArrayHelper.remove(directives, this._directives));
}
}
exports.GQLElement = GQLElement;
//# sourceMappingURL=GQLElement.js.map
;