Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Allow partial keys when invalidating cached query #224

@marcopiii

Description

@marcopiii

Suppose we have a query

export const myQuery = compose(
  product({ a: param<string>(), b: param<string>(), c: param<string>() }),
  queryShallow( 
    ({ a, b, c }) => ...do stuff... ,
    available
  )
);

And a command which invalidates it

export const myCommand = command(
  (input: { a: string }) =>  ...  ),
  { myQuery }
);

When we use the command we have to declare a combination of parameters a, b, c for which the cached value is no longer valid.

But if we want to invalidate all the cached values associated with the all the keys which contains a (something like a, *, *) there is no way to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions