-
Context: I am working in web3, so there are long chains of dependent queries because we can't simply make relational queries on the backend. I am also using problemRight now if you want an optional query, you pass the conditional to the But what if your query is both optional and dependent? You can't tell if it's some solutionsideal APITo me the ideal API is that This seems most intuitive to me, but would be a really annoying breaking change I'm sure. non-breaking APIYou could make workaroundRight now you could use the query |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
it seems like you want a return value for something that you already know, as you pass it into an option of react-query. consider:
now you don't have to inspect if it matters to you, you can still check for
|
Beta Was this translation helpful? Give feedback.
it seems like you want a return value for something that you already know, as you pass it into an option of react-query. consider:
now you don't have to inspect
status
orfetchStatus
to know what state the query is in. For react-query, there is only one state - the query(observer) is disabled. Internally, there is no need to differentiate: it doesn't matter why the query isn't running.if it matters to you, you can still check for
isEnabled
orisReady
- the variables / conditions you have implicitly available because you pa…