16.0.7 • Published 4 months ago
@types/graphql-upload v16.0.7
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 class Upload {
promise: Promise<FileUpload>;
file?: FileUpload;
}
Additional Details
- Last updated: Thu, 17 Feb 2022 18:01:34 GMT
- Dependencies: @types/graphql, @types/express, @types/koa, @types/fs-capacitor
- Global values: none
Credits
These definitions were written by Mike Marcacci.
16.0.7
4 months ago
16.0.6
4 months ago
16.0.2
7 months ago
16.0.1
8 months ago
16.0.5
6 months ago
16.0.4
7 months ago
16.0.3
7 months ago
16.0.0
1 year ago
15.0.2
1 year ago
15.0.0
1 year ago
15.0.1
1 year ago
8.0.12
2 years ago
8.0.10
2 years ago
8.0.11
2 years ago
8.0.9
2 years ago
8.0.8
2 years ago
8.0.7
3 years ago
8.0.6
3 years ago
8.0.5
3 years ago
8.0.4
4 years ago
8.0.3
5 years ago
8.0.2
5 years ago
8.0.1
5 years ago
8.0.0
5 years ago