Closed snaplesec closed 3 years ago
I have tried to implement according to the graphql-multipart spec, and I get an error with POST telling me that I don't have body-parser installed. On apollo-express-graphql do I need to use the middleware approach?
There is a full stack example of file uploads with apollo-upload-client
, graphql-upload
, and apollo-server-koa
. You have to turn off the outdated Apollo Server file upload implementation using the constructor option uploads: false
:
Then you need to setup graphql-upload
from scratch (follow the setup instructions) starting with the middleware; the example is using Koa but you can adapt it for Express.
Regarding the resolver for multiple uploads; here is one:
Hello, I'm trying to use this in apollo-server v2, and not quite sure how to implement the resolver. I am trying to do multiple files upload and don't understand how or what to do in the resolver. Do you have any examples that show how to implement this?