@pothos/core
Version:
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
50 lines (49 loc) • 1.54 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
function _export(target, all) {
for(var name in all)Object.defineProperty(target, name, {
enumerable: true,
get: Object.getOwnPropertyDescriptor(all, name).get
});
}
_export(exports, {
get ImplementableObjectRef () {
return ImplementableObjectRef;
},
get ObjectRef () {
return ObjectRef;
}
});
const _types = require("../types");
const _basewithfields = require("./base-with-fields");
function _define_property(obj, key, value) {
if (key in obj) {
Object.defineProperty(obj, key, {
value: value,
enumerable: true,
configurable: true,
writable: true
});
} else {
obj[key] = value;
}
return obj;
}
let _outputShapeKey = _types.outputShapeKey, _parentShapeKey = _types.parentShapeKey;
class ObjectRef extends _basewithfields.TypeRefWithFields {
constructor(name, config){
super('Object', name, config), _define_property(this, "kind", 'Object'), _define_property(this, "$inferType", void 0), _define_property(this, _outputShapeKey, void 0), _define_property(this, _parentShapeKey, void 0);
}
}
class ImplementableObjectRef extends ObjectRef {
implement(options) {
return this.builder.objectType(this, options);
}
constructor(builder, name){
super(name), _define_property(this, "builder", void 0);
this.builder = builder;
}
}
//# sourceMappingURL=object.js.map