adminjs-graphql
Version:
adminjs GraphQL adapter
37 lines • 1.19 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GraphQLPropertyAdapter = void 0;
const adminjs_1 = require("adminjs");
class GraphQLPropertyAdapter extends adminjs_1.BaseProperty {
constructor(property) {
super(property);
this._subProperties = [];
this._referencing = property.referencing;
this._enumValues = property.enumValues;
this._isArray = property.isArray;
this._isRequired = property.isRequired;
}
setSubProperties(properties) {
this._subProperties = properties;
}
subProperties() {
return this._subProperties;
}
reference() {
return this._referencing || null;
}
availableValues() {
var _a;
return (_a = this._enumValues) !== null && _a !== void 0 ? _a : super.availableValues();
}
isArray() {
var _a;
return (_a = this._isArray) !== null && _a !== void 0 ? _a : false;
}
isRequired() {
var _a;
return (_a = this._isRequired) !== null && _a !== void 0 ? _a : false;
}
}
exports.GraphQLPropertyAdapter = GraphQLPropertyAdapter;
//# sourceMappingURL=GraphQLProperty.js.map