From 4c8a6d7b35790acf33d04189262ceece0519a54b Mon Sep 17 00:00:00 2001 From: Robert Soriano Date: Mon, 31 Oct 2022 09:50:15 -0700 Subject: [PATCH] feat: add abortOnUnmount option --- playground/pages/index.vue | 7 ++++++- src/client/index.ts | 17 ++++++++++++++++- src/client/types.ts | 8 ++++++-- tsup.config.ts | 3 +-- 4 files changed, 29 insertions(+), 6 deletions(-) diff --git a/playground/pages/index.vue b/playground/pages/index.vue index d972881..a10b798 100644 --- a/playground/pages/index.vue +++ b/playground/pages/index.vue @@ -24,7 +24,12 @@ const addTodo = async () => { } } -const { data: todos, pending, error, refresh } = await $client.todo.getTodos.query() +const { data: todos, pending, error, refresh } = await $client.todo.getTodos.query(undefined, { + trpc: { + abortOnUnmount: true, + }, + server: false, +})