Skip to content
Source
Sign inSign up
TanStack/query

react query useQueries doesn’t accept an abort signal #5342

Send to my agent
Closedjasikpark(GitHub profile, opens in a new tab) opened this issue 2 comments

Describe the bug

The types for useQueries in the react query alpha doesn’t accept an abort signal handler to be passed to the query function.

Your minimal, reproducible example

https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAbzgVwM4FMCKz1WO1OAXzgDMoIQ4ByAARgEMA7VRgYwGsB6KdBtmAFoAjjigBPagFgAULLhsILeL1TIANvAC8KDNlz5UACgTy450QYIAuOAG0z586ZlO3cSxIDS6cbbvUpBAQ1AC6ADSO7p7iAGJMtiZwqMAA5kwM6sQAlHBaAHxwAAoUIMAYAHSqEOoAbuhGgcHU2ZGu7kRtbhFmRNkA3EA

Steps to reproduce

Run the ts playground

Expected behavior

I expected useQueries to accept query configs that are the same as a useQuery config.

I would really like for #5153 to support creating a query config that can be passed to useQuery or useQueries

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

macOS, Arc

Tanstack Query adapter

react-query

TanStack Query version

v5.0.0-alpha.21

TypeScript version

v5.0.4

Additional context

No response

  1. TkDodo changed the title

  2. TkDodo added labelsbug

  3. TkDodo added labelstypes

  4. TkDodo added labelspackage: react-query

  5. FYI, this issue exists in v4 as well, it's not v5 related.

    @artysidorenko if you find some time, please take a look

  6. Hi - this one is also related to the current TS limitations when trying to infer callback parameters nested in a tuple type.

    It was mentioned in the discussion forum, with a workaround: https://github.com/TanStack/query/discussions/4785#discussioncomment-4695929

  7. TkDodo closed this

  8. TkDodo removed labelsbug

  9. TkDodo removed labelspackage: react-query

  10. TkDodo added labelswontfix

  11. TkDodo added labelshas workaround

Sign in to join this conversation.