Skip to content
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

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

Closed
jasikpark opened this issue Apr 28, 2023 · 2 comments
Closed

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

jasikpark opened this issue Apr 28, 2023 · 2 comments
Labels
has workaround types wontfix This will not be worked on

Comments

@jasikpark
Copy link

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

@TkDodo TkDodo changed the title v5 react query useQueries doesn’t accept an abort signal react query useQueries doesn’t accept an abort signal Apr 28, 2023
@TkDodo TkDodo added bug Something isn't working types package: react-query labels Apr 28, 2023
@TkDodo
Copy link
Collaborator

TkDodo commented Apr 28, 2023

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

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

@artysidorenko
Copy link
Contributor

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: #4785 (reply in thread)

@TkDodo TkDodo closed this as not planned Won't fix, can't repro, duplicate, stale Apr 28, 2023
@TkDodo TkDodo added wontfix This will not be worked on has workaround and removed bug Something isn't working package: react-query labels Apr 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has workaround types wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants