Socket
Socket
Sign inDemoInstall

@types/graphql-upload

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/graphql-upload - npm Package Compare versions

Comparing version 8.0.12 to 15.0.0

graphql-upload/GraphQLUpload.d.ts

54

graphql-upload/index.d.ts

@@ -1,53 +0,11 @@

// Type definitions for graphql-upload 8.0
// Type definitions for graphql-upload 15.0
// Project: https://github.com/jaydenseric/graphql-upload#readme
// Definitions by: Mike Marcacci <https://github.com/mike-marcacci>
// Simon Feiden <https://github.com/rdsfj>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 4.1
// TypeScript Version: 4.8
/* tslint:disable:no-unnecessary-generics */
// Linter does not accept files without definitions. Disabling the rule at
// the top of the file doesn't work either: It breaks the meta data parser.
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;
}
export {};
{
"name": "@types/graphql-upload",
"version": "8.0.12",
"version": "15.0.0",
"description": "TypeScript definitions for graphql-upload",

@@ -12,2 +12,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-upload",

"githubUsername": "mike-marcacci"
},
{
"name": "Simon Feiden",
"url": "https://github.com/rdsfj",
"githubUsername": "rdsfj"
}

@@ -29,4 +34,22 @@ ],

},
"typesPublisherContentHash": "08997f7d084d2eaa2c1c03473515a1562b742bb27421ee5204976ca57dd4e736",
"typeScriptVersion": "4.1"
"typesPublisherContentHash": "42b1ad89cd0fc4c7f835e2f97aecf063aff939294fc042798dc67aee023f5bd6",
"typeScriptVersion": "4.8",
"exports": {
"./package.json": "./package.json",
"./GraphQLUpload.js": {
"types": "./GraphQLUpload.d.ts"
},
"./Upload.js": {
"types": "./Upload.d.ts"
},
"./graphqlUploadExpress.js": {
"types": "./graphqlUploadExpress.d.ts"
},
"./graphqlUploadKoa.js": {
"types": "./graphqlUploadKoa.d.ts"
},
"./processRequest.js": {
"types": "./processRequest.d.ts"
}
}
}

@@ -9,62 +9,5 @@ # Installation

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-upload.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/graphql-upload/index.d.ts)
````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: Wed, 19 Oct 2022 22:03:12 GMT
* Last updated: Thu, 29 Dec 2022 10:32:36 GMT
* Dependencies: [@types/express](https://npmjs.com/package/@types/express), [@types/fs-capacitor](https://npmjs.com/package/@types/fs-capacitor), [@types/graphql](https://npmjs.com/package/@types/graphql), [@types/koa](https://npmjs.com/package/@types/koa)

@@ -74,2 +17,2 @@ * Global values: none

# Credits
These definitions were written by [Mike Marcacci](https://github.com/mike-marcacci).
These definitions were written by [Mike Marcacci](https://github.com/mike-marcacci), and [Simon Feiden](https://github.com/rdsfj).
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc