Options accepted by a hook's refetch(). Structural subset of
TanStack Query v5's RefetchOptions — kept local so this package
doesn't have to re-export TanStack's public types.
The one field that matters in practice is cancelRefetch:
true (TanStack default) — cancel any in-flight fetch first, then
start a fresh one. Correct when the caller wants a guaranteed-fresh
read (e.g. after a mutation or user-triggered refresh).
false — if a fetch is already in flight, don't cancel it; return
its result instead. Correct when a background poll fires and the
caller doesn't want to interrupt an infinite-scroll cursor walk.
Options accepted by a hook's
refetch(). Structural subset of TanStack Query v5'sRefetchOptions— kept local so this package doesn't have to re-export TanStack's public types.The one field that matters in practice is
cancelRefetch:true(TanStack default) — cancel any in-flight fetch first, then start a fresh one. Correct when the caller wants a guaranteed-fresh read (e.g. after a mutation or user-triggered refresh).false— if a fetch is already in flight, don't cancel it; return its result instead. Correct when a background poll fires and the caller doesn't want to interrupt an infinite-scroll cursor walk.