@types/graphql-upload
TypeScript definitions for graphql-upload
Last updated 4 years ago by types .
MIT · Repository · Original npm · Tarball · package.json
$ cnpm install @types/graphql-upload 
SYNC missed versions from official npm registry.

Installation

npm install --save @types/graphql-upload

Summary

This package contains type definitions for graphql-upload (https://github.com/jaydenseric/graphql-upload#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-upload.

index.d.ts

// Type definitions for graphql-upload 8.0
// Project: https://github.com/jaydenseric/graphql-upload#readme
// Definitions by: Mike Marcacci <https://github.com/mike-marcacci>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 4.1

/* tslint:disable:no-unnecessary-generics */

import { IncomingMessage, ServerResponse } from "http";
import { GraphQLScalarType } from "graphql";
import { RequestHandler } from "express";
import { DefaultContext, DefaultState, Middleware } from "koa";
import { ReadStream } from "fs-capacitor";

export interface UploadOptions {
  maxFieldSize?: number | undefined;
  maxFileSize?: number | undefined;
  maxFiles?: number | undefined;
}

export interface GraphQLOperation {
  query: string;
  operationName?: null | string | undefined;
  variables?: null | unknown | undefined;
}

export function processRequest(
  request: IncomingMessage,
  response: ServerResponse,
  uploadOptions?: UploadOptions
): Promise<GraphQLOperation | GraphQLOperation[]>;

export function graphqlUploadExpress(
  uploadOptions?: UploadOptions
): RequestHandler;

export function graphqlUploadKoa <StateT = DefaultState, ContextT = DefaultContext>(
  uploadOptions?: UploadOptions
): Middleware<StateT, ContextT>;

export const GraphQLUpload: GraphQLScalarType;

export interface FileUpload {
  filename: string;
  mimetype: string;
  encoding: string;
  createReadStream(): ReadStream;
}

export type Upload = Promise<FileUpload>;

Additional Details

Credits

These definitions were written by Mike Marcacci.

Current Tags

  • 8.0.10                                ...           latest (4 years ago)
  • 8.0.4                                ...           ts3.3 (6 years ago)
  • 8.0.4                                ...           ts3.4 (6 years ago)
  • 8.0.4                                ...           ts3.5 (6 years ago)
  • 8.0.6                                ...           ts3.6 (5 years ago)
  • 8.0.7                                ...           ts3.7 (5 years ago)
  • 8.0.8                                ...           ts3.8 (4 years ago)
  • 8.0.8                                ...           ts3.9 (4 years ago)
  • 8.0.8                                ...           ts4.0 (4 years ago)
  • 8.0.10                                ...           ts4.1 (4 years ago)
  • 8.0.10                                ...           ts4.2 (4 years ago)
  • 8.0.10                                ...           ts4.3 (4 years ago)
  • 8.0.10                                ...           ts4.4 (4 years ago)
  • 8.0.10                                ...           ts4.5 (4 years ago)
  • 8.0.10                                ...           ts4.6 (4 years ago)

11 Versions

  • 8.0.10                                ...           4 years ago
  • 8.0.9                                ...           4 years ago
  • 8.0.8                                ...           4 years ago
  • 8.0.7                                ...           5 years ago
  • 8.0.6                                ...           5 years ago
  • 8.0.5                                ...           5 years ago
  • 8.0.4                                ...           6 years ago
  • 8.0.3                                ...           7 years ago
  • 8.0.2                                ...           7 years ago
  • 8.0.1                                ...           7 years ago
  • 8.0.0                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 6
This Month 7
Last Day 0
Last Week 1
Last Month 0
Dependencies (4)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |