Giter VIP home page Giter VIP logo

Comments (2)

jaydenseric avatar jaydenseric commented on June 11, 2024

I've never seen this kind of error before, but maybe it has something to do with the fetch option keepalive?

Here is an explanation of it:

https://javascript.info/fetch-api#keepalive

Perhaps try setting keepalive to false in your fetch options.

from apollo-upload-client.

jaydenseric avatar jaydenseric commented on June 11, 2024

Closing because it seems as per the above comment, the culprit was likely the fetch option keepalive being set to true, which isn't a default for fetch or something this package does. When someone customises fetch options in their project it is up to them to be aware of all of the consequences, although I too find this gotcha a little surprising.

In theory, I guess the upload terminating link could detect that the fetch options has keepalive set to true, and if it's a GraphQL multipart request console.warn about the risks. It's a bit tricky to try to sniff how big the multipart request is and try to guess what the browser limit might be to conditionally warn, and it might annoy people sending small files that are within the limits to be warned all the time. So then you might want to make the warnings configurable. All of this is adding complexity that increases bundle size for everyone; even people not using keepalive. So at most we might be able to update the readme to explain this gotcha somewhere in the setup section, or a new "gotchas" or "tips" section.

from apollo-upload-client.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.