Skip to content

Query invalidation should support inputs/outputs, so that more specific invalidation can be done #422

@patroza

Description

@patroza
diff --git a/packages/vue/src/mutate.ts b/packages/vue/src/mutate.ts
index b090ecf99..5d0219e3d 100644
--- a/packages/vue/src/mutate.ts
+++ b/packages/vue/src/mutate.ts
@@ -66,12 +66,12 @@ export function make<A, E, R>(self: Effect.Effect<A, E, R>) {
   return tuple(result, latestSuccess, execute)
 }
 
-export interface MutationOptionsBase {
+export interface MutationOptionsBase<I extends readonly any[], A, E> {
   /**
    * By default we invalidate one level of the query key, e.g $project/$configuration.get, we invalidate $project.
    * This can be overridden by providing a function that returns an array of filters and options.
    */
-  queryInvalidation?: (defaultKey: string[], name: string) => {
+  queryInvalidation?: (defaultKey: string[], name: string, input: I, exit: Exit.Exit<A, E>) => {
     filters?: InvalidateQueryFilters | undefined
     options?: InvalidateOptions | undefined
   }[]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions