-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V2: Replace disableQuery with skipToken #428
V2: Replace disableQuery with skipToken #428
Conversation
Signed-off-by: Timo Stamm <ts@timostamm.de>
...baseOptions, | ||
...queryOptions, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change accepts all TanStack Query options, even if they override an option provided by us. The types are changed to allow all options.
queryFn
and queryKey
are still typed, since the option type is not inferred.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@paul-sachs, I've reverted the change to the types in 786fde4.
This means we do not allow overriding computed options with this PR. We can still merge the users options into our options in the hooks because TanStack Query honors the skipToken
on it's own and we don't have to set enabled: false
. We can allow overriding later if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me, might as well keep them in separate PRs anyways.
Signed-off-by: Timo Stamm <ts@timostamm.de>
…leQuery-with-skipToken,-allow-overriding-computed-options
Enabling typechecking tests with vitest. --------- Signed-off-by: Paul Sachs <psachs@buf.build>
…ableQuery-with-skipToken,-allow-overriding-computed-options Signed-off-by: Timo Stamm <ts@timostamm.de>
c9104be
to
fdd0eba
Compare
…leQuery-with-skipToken,-allow-overriding-computed-options
Signed-off-by: Timo Stamm <ts@timostamm.de>
TanStack query added skipToken - we can use it instead of
disableQuery
.