urql-graphql / urql

The highly customizable and versatile GraphQL client with which you add on features like normalized caching as you grow.
https://urql.dev/goto/docs
MIT License
8.61k stars 449 forks source link

fix(core): Return fetch source cancellation to old behaviour #3239

Closed kitten closed 1 year ago

kitten commented 1 year ago

Related #3234

Summary

This PR returns the AbortController invocation to its previous behaviour, when it used to be more forceful.

The fetchSource will now properly abort the request outside of when its async generator yields results. This means that it can now abort after headers have been delivered but before a response body becomes available. This will cause us to now cancel requests again that are stalled and hence not wait for a response body if it's not needed any longer.

Set of changes