All of my React client requests get routed to a Node/express server for server-side rendering and then onto a Python/Django app via the graphqlExpress function from apollo-server-express. The client uses apollo-upload-client for file uploads. Unfortunately, apollo-server-express doesn't support multipart file requests and the alternative apollo-upload-server library automatically parses multipart requests, which would resolve before reaching Django. So, in a nutshell: Does anyone know how to forward multipart requests (i.e. streams) through Node and onto Django?
Asked
Active
Viewed 486 times
1
-
you said the problem with `apollo-upload-server` is that it resolves before reaching Django, but if you don't need it to resolve, whats the problem with `apollo-server-express` not supporting it ? wouldn't that mean that it does not resolve? (as you seem to want) – ed' Jul 27 '18 at 08:52
-
Good question. I initially thought apollo-server-express would simply pass the socket through. But, it seems to remove the socket/promise altogether. So, the request body to Django is empty. – lgants Jul 28 '18 at 00:10