jotaijs / jotai-urql

Jotai integration library for URQL
MIT License
29 stars 5 forks source link

getVariables can be called even when getPause returns true #19

Closed scamden closed 6 months ago

scamden commented 6 months ago

We frequently use getPause to stop a jotai-urql atom from querying when one of our input variables is null. The main query callback doesn't call getVariables when getPause returns true in this case, but the reexecute one does, which triggers invariants for us sometimes if someone wanted to assert that what they validated in getPause is true within getVariables.

Would be great to only call getVariables in getPause is not true.

RIP21 commented 6 months ago

I think this is already solved and actually published in the latest version: https://github.com/jotaijs/jotai-urql/pull/15

Unless I don't understand the problem correctly.

scamden commented 6 months ago

yep whoops! we were one patch version behind. i verified the latest version fixes this for us. Thanks for being a step ahead!