Skip to content

ReactivityKeys: Able to invalidate by namespace #323

Open

Description

@patroza

Say I have a key:
["Users", "GetUser", { id: 1 }]

I would like to be able to invalidate:

  • ["Users", "GetUser", { id: 1 }] User.GetUser with { id : 1 } query
  • ["Users", "GetUser"] all Users.GetUser queries
  • ["Users"] all Users queries
  • [] all queries

as an alternative, perhaps invalidate on mutation could be a callback, which may inspect all current keys, and return the subset to invalidate.

Activity

  1. tim-smart commented on Aug 18, 2025

    @tim-smart
    Owner

    Reactivity supports invalidating namespaces, just need to expose the record syntax in a way that has a stable Hash.

    {
      users: [1, 2, 3]
    }

    That would invalidate both "users", and also nested keys.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions