How to use the graphql-upload.GraphQLUpload.description function in graphql-upload

To help you get started, we’ve selected a few graphql-upload examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github qmit-pro / moleculer-api / src / schema / plugin / protocol / graphql / handler / options.ts View on Github external
/*
  GraphQL Plugin default options for base schema and resolvers
*/

import { GraphQLHandlersOptions } from "./handlers";
import { InMemoryLRUCache } from "apollo-server-caching";
import { GraphQLUpload } from "graphql-upload";
import { GraphQLJSON } from "graphql-type-json";
import { GraphQLDate, GraphQLDateTime, GraphQLTime } from "graphql-iso-date";

// TODO: as preset

delete GraphQLUpload.description;
delete GraphQLJSON.description;
delete GraphQLDate.description;
delete GraphQLDateTime.description;
delete GraphQLTime.description;

const typeDefs: string[] = [];
const resolvers: any = {};

/* default scalar types */
typeDefs.push(`
"""
Upload scalar type
@input: [GraphQL multipart request spec](https://github.com/jaydenseric/graphql-multipart-request-spec)
@output: { filename, mimetype, encoding, createReadStream }
filename          string    File name.
mimetype          string    File MIME type. Provided by the client and can’t be trusted.

graphql-upload

Middleware and an Upload scalar to add support for GraphQL multipart requests (file uploads via queries and mutations) to various Node.js GraphQL servers.

MIT
Latest version published 2 years ago

Package Health Score

53 / 100
Full package analysis