Closed that-one-arab closed 2 years ago
Are you trying to test your GraphQL API processes GraphQL multipart request mutations correctly, or are you trying to test your front end project code? If it's the first, you shouldn't use Apollo Client or this package; just make the requests manually. You can use use fetch
(via node-fetch
) and FormData
(via formdata-node
).
I was wondering if there was a good strategy to write tests that automatically selects a local image/s, then sends an HTTP request to the server. I tried doing it server-side but failed because I couldn't manage to transfer the image to a blob and send it (I always received the image's mimetype as application/octal-stream) Maybe I missed some tips while researching, I hope this is an appropriate place to ask this question, and if it is, I hope I get some insight on how to do it.