Skip to content
Source
Sign inSign up
TanStack/query

Reset query cannot reset a particullar query but it resetting everything #8243

Send to my agent
Closedbloodykheeng(GitHub profile, opens in a new tab) opened this issue 1 comment

Describe the bug

i wanted eg on delete to reset a query such that isloading is triggered but i notted its just reseting everything i wanted to reset this

 queryClient.resetQueries(["users"]);

i want something that can do what invalidate query does on a particular query but with isLoading set to true invalidate doesnt set isLoading true on a particular query

Your minimal, reproducible example

i have no link currently

Steps to reproduce

put this in onSuccess call back of a particular mutation eg users queryClient.resetQueries(["users"]);

Expected behavior

i expected only users query to be reset and isLoading true

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

Os windows chrome react js

Tanstack Query adapter

react-query

TanStack Query version

5.45.1

TypeScript version

No response

Additional context

No response

  1. Thank you for filing this issue, but we need more information before looking into this.

    Specifically, a minimal, standalone, runnable reproduction is needed - preferably with codesandbox or stackblitz. If your issue is TypeScript related, prefer a TypeScript playground.

    We'll close this issue for now, but we'll certainly re-open it if there is a proper reproduction.

  2. TkDodo closed this

  3. TkDodo added labelsneeds-info

Sign in to join this conversation.