@pothos/core
Version:
Pothos (formerly GiraphQL) is a plugin based schema builder for creating code-first GraphQL schemas in typescript
33 lines (32 loc) • 1.15 kB
JavaScript
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;
}
import { outputShapeKey, parentShapeKey } from '../types/index.js';
import { TypeRefWithFields } from './base-with-fields.js';
let _outputShapeKey = outputShapeKey, _parentShapeKey = parentShapeKey;
export class InterfaceRef extends TypeRefWithFields {
constructor(name, config) {
super("Interface", name, config), _define_property(this, "kind", "Interface"), _define_property(this, "$inferType", void 0), _define_property(this, _outputShapeKey, void 0), _define_property(this, _parentShapeKey, void 0);
}
}
export class ImplementableInterfaceRef extends InterfaceRef {
implement(options) {
return this.builder.interfaceType(this, options);
}
constructor(builder, name) {
super(name), _define_property(this, "builder", void 0);
this.builder = builder;
}
}
//# sourceMappingURL=interface.js.map