UNPKG

graphql-upload-ts

Version:

Typescript minimalistic and developer friendly middleware and an Upload scalar to add support for GraphQL multipart requests (file uploads via queries and mutations) to various Node.js GraphQL servers.

19 lines 570 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Upload = void 0; class Upload { constructor() { this.promise = new Promise((resolve, reject) => { this.resolve = (file) => { this.file = file; resolve(file); }; this.reject = reject; }); // Prevent errors crashing Node.js, see: // https://github.com/nodejs/node/issues/20392 this.promise.catch(() => { }); } } exports.Upload = Upload; //# sourceMappingURL=Upload.js.map