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
Post a Comment