17.0.0 • Published 6 months ago
@types/graphql-upload v17.0.0
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.
17.0.0
6 months ago
16.0.7
1 year ago
16.0.6
1 year ago
16.0.2
2 years ago
16.0.1
2 years ago
16.0.5
2 years ago
16.0.4
2 years ago
16.0.3
2 years ago
16.0.0
2 years ago
15.0.2
2 years ago
15.0.0
2 years ago
15.0.1
2 years ago
8.0.12
3 years ago
8.0.10
3 years ago
8.0.11
3 years ago
8.0.9
3 years ago
8.0.8
3 years ago
8.0.7
4 years ago
8.0.6
4 years ago
8.0.5
4 years ago
8.0.4
5 years ago
8.0.3
6 years ago
8.0.2
6 years ago
8.0.1
6 years ago
8.0.0
6 years ago