{"repo":"jaydenseric/graphql-upload","free":true,"listed":false,"github":"https://github.com/jaydenseric/graphql-upload","clone":"git clone https://github.com/jaydenseric/graphql-upload.git","description":"Middleware and a scalar Upload to add support for GraphQL multipart requests (file uploads via queries and mutations) to various Node.js GraphQL servers.","language":"JavaScript","stars":1442,"topics":["apollo","graphql","express","koa","node","mjs","npm","esm","maintained"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"graphql-upload Middleware and a scalar Upload to add support for GraphQL multipart requests (file uploads via queries and mutations) to various Node.js GraphQL servers. Clients implementing the GraphQL multipart request spec upload files as Upload scalar query or mutation variables. Their resolver values are promises that resolve file upload details for processing and storage. Files are typically streamed into cloud storage but may also be stored in the filesystem. Installation [!TIP] First, check if there are GraphQL multipart request spec server implementations (most for Node.js integrate graphql-upload ) that are more suitable for your environment than a manual setup. To install graphql-upload and its peer dependency graphql with npm, run: Use the middleware graphqlUploadKoa or graphqlUploadExpress just before GraphQL middleware. Alternatively, use the function processRequest to create custom middleware. A schema built with separate SDL and resolvers (e.g. using the function makeExecutableSchema from @graphql-tools/schema ) requires the scalar Upload to be setup. Then, the scalar Upload can be used for query or mutation arguments. For how to use the scalar value in resolvers, see the documentation in the module GraphQLUpload.mjs . Examples - Apollo upload examples repo; a full stack demo of file uploads via GraphQL mutations using apollo-server-koa and @apollo/client . Tips - The process must have both read and write access to the directory identified by os.tmpdir() . - Th","default_branch":null,"files":null,"tree":[],"storefront":"/r/jaydenseric","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jaydenseric/graphql-upload/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}