GraphQL Yoga v2 documentation (superseded by v5): GraphQL Yoga supports GraphQL Multipart Request Specification which allows you to upload files via HTTP and consume the binary data inside GraphQL Resolvers.
GraphQL Yoga supports
GraphQL Multipart Request Specification
which allows you to upload files via HTTP and consume the binary data inside GraphQL Resolvers.
In GraphQL Yoga, you consume uploaded files or blobs as WHATWG standard
File or
Blob objects you might be familiar from
the browser’s API.
If you want to disable multipart request processing for some reason, you can pass
multipart: false{:ts} to prevent Yoga from handling multipart requests.
createServer({ multipart: false })
Configuring Multipart Request Processing (only for Node.js)
In Node.js, you can configure the limits of the multipart request processing such as maximum allowed
file size, maximum numbers of files, etc.
createServer({ multipart: { // Maximum allowed file size (in bytes) fileSize: 1000000, // Maximum allowed number of files files: 10, // Maximum allowed size of content (operations, variables etc...) fieldSize: 1000000, // Maximum allowed header size for form data headerSize: 1000000 }})
This site uses cookies for analytics and improving your experience.