-
-
Notifications
You must be signed in to change notification settings - Fork 450
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix operation queue to only affect reexecuteOperation (#662)
* Fix operation queue to only affect reexecuteOperation Previously any call that dispatches an operation could lead to a queued dispatch, which stops peeking from working since the effect (exchange pipeline) isn't actually executed on the spot. In such a case the queue is flushed later which can lead to undefined behaviour, e.g. looping onOperationEnd, which means that we think a query is active while it's not. Instead we want to apply the operation queuing only to client.reexecuteOperation, which is what's called from inside exchanges. The new behaviour: We now queue up operations from reexecuteOperation when we're currently dispatching another operation. Otherwise every operation executes immediately. * Update snapshot tests
- Loading branch information
Showing
5 changed files
with
14 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@urql/core': patch | ||
--- | ||
|
||
Fix critical bug in operation queueing that can lead to unexpected teardowns and swallowed operations. This would happen when a teardown operation kicks off the queue. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
119 changes: 0 additions & 119 deletions
119
packages/react-urql/src/__snapshots__/context.test.ts.snap
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.