Skip to content

Invalidate by ID in react-query #29

@jjsessa

Description

@jjsessa

It would be awesome if there was a way to invalidate and/or refetch all queries based on an ID. I often find myself 3-4 layers deep in a nested object and I need to invalidate every single list view in all of its parents, but I don't want to invalidate pages of those lists if they don't contain the child. This would be especially useful paired with paginated/infinite query helpers and is also a great onError default for failed mutations.

I would love to help implement this, @klis87 could you point me in right direction if this is possible and what methods from core need to be wrapped.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions