javascript - Is there any way to send multipart form request to graphql in reactjs with apollo client -


i new react graphql.

i want upload .pdf file server via network interface.

all need write graphql query using apollo client sends multipart form data server.

i tried search on google did't found proper solution.

mutation createuser($user: myfile) {     createdata(myfile: $user) {         id         name         email     }   } 

graphql doesn't deal multipart data or file uploads, if writing server can create custom request type has more fields query, , make work. this guy did here.

this rather roundabout way go @ give lots of headaches. recommend being less stubborn single endpoint, , use different server manage upload. after all, there lots of tested libraries dealing "the devils details" surrounding uploads.


Comments

Popular posts from this blog

cookies - Yii2 Advanced - Share session between frontend and mainsite (duplicate of frontend for www) -

angular - password and confirm password field validation angular2 reactive forms -

php - Permission denied. Laravel linux server -