UNPKG

graphql-compose-mongoose

Version:

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

22 lines 690 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getRuntimeErrorOTC = exports.RuntimeError = void 0; 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', }, }); }); } exports.getRuntimeErrorOTC = getRuntimeErrorOTC; //# sourceMappingURL=RuntimeError.js.map