# jaydenseric/graphql-upload

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jaydenseric-graphql-upload).**

1,439 stars · 137 forks · JavaScript · MIT

## Links

- GitHub: https://github.com/jaydenseric/graphql-upload
- Homepage: https://npm.im/graphql-upload
- awesome-repositories: https://awesome-repositories.com/repository/jaydenseric-graphql-upload.md

## Topics

`apollo` `esm` `express` `graphql` `koa` `maintained` `mjs` `node` `npm`

## Description

GraphQL Upload is a utility for Node.js environments that enables GraphQL servers to process file uploads. It functions by integrating custom scalar types into the GraphQL schema and providing middleware to intercept and parse incoming multipart requests.

The library distinguishes itself by handling file data as asynchronous readable streams, which allows servers to process large files without requiring intermediate local disk storage or loading entire files into memory. It also incorporates resource protection mechanisms, including configurable limits on file sizes and the total number of files per request, to prevent memory exhaustion and maintain server stability.

Beyond its core processing capabilities, the project provides validation for multipart request structures and field types to ensure data integrity. It is designed to be installed as a dependency within existing GraphQL server architectures to facilitate standard file transmission through mutations.

## Tags

### Web Development

- [GraphQL Multipart Upload Servers](https://awesome-repositories.com/f/web-development/multipart-upload-utilities/multipart-form-parsing/graphql-multipart-upload-servers.md) — Enables file transmission through GraphQL mutations by integrating multipart request support into Node.js server architectures. ([source](https://github.com/jaydenseric/graphql-upload#readme))
- [GraphQL Integration Middleware](https://awesome-repositories.com/f/web-development/backend-development/web-frameworks/node-js-server-frameworks/graphql-integration-middleware.md) — Integrates file upload capabilities into Node.js GraphQL servers using custom scalar types and request middleware.
- [GraphQL API Development](https://awesome-repositories.com/f/web-development/graphql-api-development.md) — Facilitates GraphQL API development by enabling clients to pass file data as variables during standard operations.
- [Multipart Form Parsing](https://awesome-repositories.com/f/web-development/multipart-upload-utilities/multipart-form-parsing.md) — Parses incoming HTTP multipart form data to extract file streams and metadata for the GraphQL execution layer.
- [Request Interception Middlewares](https://awesome-repositories.com/f/web-development/request-interception-middlewares.md) — Hooks into the server request pipeline to intercept and process multipart content types before they reach the GraphQL engine.

### Data & Databases

- [File Upload Streams](https://awesome-repositories.com/f/data-databases/data-processing-pipelines/stream-processing-systems/stream-processing/memory-efficient-data-streaming/file-upload-streams.md) — Provides file data as asynchronous readable streams to resolvers, enabling memory-efficient processing of large files without intermediate disk storage. ([source](https://github.com/jaydenseric/graphql-upload/blob/master/readme.md))

### Programming Languages & Runtimes

- [GraphQL Custom Scalars](https://awesome-repositories.com/f/programming-languages-runtimes/data-type-conversions/graphql-custom-scalars.md) — Integrates custom scalar types into GraphQL schemas to define and accept file uploads as variables. ([source](https://github.com/jaydenseric/graphql-upload#readme))

### Security & Cryptography

- [Upload Request Validation](https://awesome-repositories.com/f/security-cryptography/file-upload-security/upload-request-validation.md) — Restricts the size of fields, individual files, and the total number of files per request to prevent resource exhaustion. ([source](https://github.com/jaydenseric/graphql-upload/blob/master/changelog.md))
- [Request Size Limiters](https://awesome-repositories.com/f/security-cryptography/request-size-limiters.md) — Enforces strict limits on file sizes and total request volume to prevent memory exhaustion and denial of service.

### User Interface & Experience

- [Server-Side Upload Constraints](https://awesome-repositories.com/f/user-interface-experience/file-uploaders/asynchronous-uploaders/server-side-upload-constraints.md) — Implements size limits and request validation to prevent malicious file uploads from exhausting server resources.
