UNPKG

@apollographql/apollo-upload-server

Version:

Enhances Apollo GraphQL Server for intuitive file uploads via GraphQL mutations.

24 lines (18 loc) 628 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GraphQLUpload = void 0; var _graphql = require("graphql"); const GraphQLUpload = new _graphql.GraphQLScalarType({ name: 'Upload', description: 'The `Upload` scalar type represents a file upload promise that resolves ' + 'an object containing `stream`, `filename`, `mimetype` and `encoding`.', parseValue: value => value, parseLiteral() { throw new Error('Upload scalar literal unsupported'); }, serialize() { throw new Error('Upload scalar serialization unsupported'); } }); exports.GraphQLUpload = GraphQLUpload;