This demo uses Meteor, Apollo Client+Server and Multer to show one way to handle file uploads to an Apollo app. It is adapted from the tests written for Express-GraphQL.
- After installing the dependencies, run
meteorto get up and running. - Post to
localhost:3000/graphqlwith something along the lines of these post body key/value pairs:query:mutation newFile($fileName : String) { uploadFile(fileSaveName : $fileName) { originalname, mimetype}}operationName:newFilevariables:{"fileName": "SaveNameForNewFile"}file: Attach a file to be uploaded. This is most easily done using a "REST Client" like Postman.
- In the future, the file upload field currently in the UI should hook into Apollo Client and perform the upload. At the moment, that file uploader is pretty useless.
