Closed wobsoriano closed 12 months ago
This PR improves thegetQueryKey helper so that it's able to accept a procedure and return the cache key:
getQueryKey
import { getQueryKey } from 'trpc-nuxt/client' const queryKey = getQueryKey($client.getTodos, undefined) // Access to the cached value const { data } = useNuxtData(queryKey) // Mutate data.value.push({...}) // Invalidate await refreshNuxtData(queryKey)
Also some cleanups
The latest updates on your projects. Learn more about Vercel for Git ↗︎
This PR improves the
getQueryKey
helper so that it's able to accept a procedure and return the cache key:Also some cleanups