UNPKG

graphql-compose-mongoose

Version:

Plugin for `graphql-compose` which derive a graphql types from a mongoose model.

22 lines 661 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.RuntimeError = void 0; exports.getRuntimeErrorOTC = getRuntimeErrorOTC; class RuntimeError extends Error { constructor(message) { super(message); this.__proto__ = RuntimeError.prototype; } } exports.RuntimeError = RuntimeError; function getRuntimeErrorOTC(schemaComposer) { return schemaComposer.getOrCreateOTC('RuntimeError', (otc) => { otc.addFields({ message: { description: 'Runtime error message', type: 'String', }, }); }); } //# sourceMappingURL=RuntimeError.js.map