UNPKG

@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.13 kB
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 ObjectRef extends 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); } } export 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