Giter VIP home page Giter VIP logo

Comments (7)

AdamYee avatar AdamYee commented on May 22, 2024 2

@jaydenseric updated to 4.0.1 and all is well.

from apollo-upload-client.

jaydenseric avatar jaydenseric commented on May 22, 2024

@AdamYee ?

Just tried updating apollo-upload-examples to v4 and it immediately errors.

from apollo-upload-client.

jaydenseric avatar jaydenseric commented on May 22, 2024

I think this and this should not have been changed.

from apollo-upload-client.

AdamYee avatar AdamYee commented on May 22, 2024

Hey guys,

I was able to reproduce by removing opts from the createNetworkInterface config. Something that I didn't test because my app needs the cookies. Fetch queries (not mutations) will just fail silently, but when I attempt to upload a file I get the same error as @benhjames.

@jaydenseric so the changes to the lines you referenced are still needed, but they need to pass in an empty object when there isn't an opts defined when creating the network interface like what most people probably do at first:

const networkInterface = createNetworkInterface({
  uri: '/graphql'
});

The fix should look something like this in the network-interface.js and batch-network-interface.js files:

return _HTTPFetchNetworkInte.prototype.fetchFromRemoteEndpoint.call(this, { request: request, options: options.opts || {} });

In the meantime, if people need a quick workaround they can create the network interface with an empty opts:

const networkInterface = createNetworkInterface({
  uri: '/graphql',
  opts: {} // just to get around the 4.0.0 bug
});

😃

from apollo-upload-client.

jaydenseric avatar jaydenseric commented on May 22, 2024

This seems to be ok now on master branch.

I am getting paranoid every time I publish a new release, it's so hard to manually test everything. We really need some unit tests!

from apollo-upload-client.

jaydenseric avatar jaydenseric commented on May 22, 2024

Just released v4.0.1, please let me know if everything is happy chappy 🙏

from apollo-upload-client.

bensalilijames avatar bensalilijames commented on May 22, 2024

Yep, thanks a lot!

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.