skipToken for useInfiniteQuery #8795
Unanswered
maiorBoltach
asked this question in
General
Replies: 1 comment
-
show a typescript playground please |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello colleagues,
In my typescript project I have to use useInfiniteQuery for sub-entities with
projectId
that can be not defined.Example:
The main problem is in getProjectUsers method that strictly requires number without any undefined.
For useQuery this problem can be solved in the next way:
There are possible workarounds only in checking this value in component or smth like
projectId || 0
in queryFn itself.Are there more simple and straightforward solutions?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions