You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with dependent queries I am often times using the skipToken export, provided by react query. When using a query configuration in the semantics of e.g.:
Looks like the same issue happens when using the skipToken in vue query. E.g. when using the recommended way of using a computed as the queryFn argument that either returns the function or the skip token. See this
queryFn: computed(() => {
const value = toValue(id)
return value ? () => userApi.fetchById(value).then((response) => response.data) : skipToken
})
Any solutions for this?
Other than manually typing out UseQueryResult for each hook?
Edit: Seems like doing () => value ? fetch() : skipToken works fine (Instead of value ? () => fetch() : skipToken). Never mind, the resulting UseQueryResult contains unique symbol, so not good either.
When working with dependent queries I am often times using the
skipToken
export, provided by react query. When using a query configuration in the semantics of e.g.:The resulting data is not
number | undefined
but rather alwaysunknown
.The text was updated successfully, but these errors were encountered: