jaydenseric / apollo-upload-client

A terminating Apollo Link for Apollo Client that fetches a GraphQL multipart request if the GraphQL variables contain files (by default FileList, File, or Blob instances), or else fetches a regular GraphQL POST or GET request (depending on the config and GraphQL operation).
https://npm.im/apollo-upload-client
1.54k stars 156 forks source link

Pending requests issue #342

Closed moroale93 closed 7 months ago

moroale93 commented 9 months ago

There is something not working on the upload link. The requests are pending forever.

Screenshot 2024-02-21 at 09 12 54 Screenshot 2024-02-21 at 09 13 00

but if you copy the exact same cURL request from the network tab and paste it on e.g. PostMan (selecting the same file), the request it's working.

Screenshot 2024-02-21 at 09 13 20

I've added the example here: https://github.com/moroale93/upload-gql

jaydenseric commented 9 months ago

In the past, there have been some issues with different dev tools, particularly for React Native conflicting with the Chrome network inspector. Just having the tools running or the inspector open could cause multipart requests to display as pending.

It's good that you have a reproduction in https://github.com/moroale93/upload-gql , but it's not minimal with a lock file close to 32k lines of code long:

https://github.com/moroale93/upload-gql/blob/main/package-lock.json

It's a security risk for me to install a project like that on my local machine without auditing all the dependencies.

I'll leave this issue open for a bit to give you a chance to isolate a specific problem with the apollo-upload-client code that I maintain in this repo, but as you can understand I don't have the availability to help people debug projects to figure out what is a bug or not, I can only action issues here that report specific bugs that have already been found. 9/10 times someone has something weird happening in their project it's a bug in their project code, not this library.

jaydenseric commented 7 months ago

As commented above, closing in the absence of a more minimal reproduction. In particular, it would be good if you are able to figure out how to reproduce your issue using a fork of the Apollo upload examples:

https://github.com/jaydenseric/apollo-upload-examples