This updates the outdated dependencies array in react-urql’s useQuery (which still contained getSnapshot) and adds args.pause. It does the same in useSubscription.
When executeQuery/executeSubscription are not re-created when all dependencies change, the first render when they're outdated would refresh the dependencies to an older version, causing the source to be immediately overridden again.
This specifically caused an edge case because the dependencies didn't include args.pause. This means that the execute functions are outdated the render after args.pause changes, and means that their state change is immediately overwritten.
Set of changes
Update executeQuery / executeSubscription dependencies to account for args.pause changes
Resolves #3289 Supersedes #3289
Summary
This updates the outdated dependencies array in
react-urql
’suseQuery
(which still containedgetSnapshot
) and addsargs.pause
. It does the same inuseSubscription
.When
executeQuery
/executeSubscription
are not re-created when all dependencies change, the first render when they're outdated would refresh the dependencies to an older version, causing the source to be immediately overridden again.This specifically caused an edge case because the dependencies didn't include
args.pause
. This means that the execute functions are outdated the render afterargs.pause
changes, and means that their state change is immediately overwritten.Set of changes
executeQuery
/executeSubscription
dependencies to account forargs.pause
changes