-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
V2: Add overload to make sure createQueryOptions only returns skipTok…
…en when could be passed skipToken (#469) In order to use createQueryOptions with recent versions of react-query and `useSuspenseQuery`, we need to make sure createQueryOptions isn't passing `skipToken` as a potential type when the input type couldn't be skipToken. This is because the typings for `useSuspenseQuery` now disallow skipping (which was always the case, just was not reflected in the types.) To fix this, we overload the `createQueryOptions` call to indicate with it's types that it will only return a skipToken when input is a skipToken. Signed-off-by: Paul Sachs <psachs@buf.build>
- Loading branch information
1 parent
1d5e7c9
commit 4f29429
Showing
3 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters