You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been a bit all over the place trying to find the source of this problem.
Ultimately, I had to enable binary media on API Gateway, which works to an extent. It encodes the multipart/form-data into base64. In my apollo server handler I convert it back to a binary string, but it does not seem to be recognised by the busboy parser in the processrequest file.
AWS lambdas are not really suited to processing multipart requests that are meant to be processed in chunks that stream in, especially if you are processing potentially large uploads. You will run into a lot of challenges trying to get it to work, things like memory usage and timeout issues.
Since AWS will gather the whole request in memory before passing it on to your function, any workarounds to try to simulate a request stream for processRequest which then buffers it to "disk" via fs-capacitor would be a performance tragedy. You'd probably better off implementing file uploads as base64 string mutation arguments.
Track #155 for propper AWS Lambda support. We could publish a function that processes an event into something that can be passed into existing GraphQL handlers, without using fs-capacitor. It would read the GraphQL multipart request form data (Base64?) string, and extract the files and query and variables, putting them together to look like a regular GraphQL POST request. I haven't thought a lot about the details, and don't plan to work on it personally as I don't have a need for it for any of my work or personal projects.
I've been a bit all over the place trying to find the source of this problem.
Ultimately, I had to enable binary media on API Gateway, which works to an extent. It encodes the multipart/form-data into base64. In my apollo server handler I convert it back to a binary string, but it does not seem to be recognised by the busboy parser in the processrequest file.
This is in my index file:
I get the following error in my logs:
Am I missing something obvious? I tried doing it without base64 conversion as well but to no avail
The text was updated successfully, but these errors were encountered: