mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-29 11:20:33 +01:00
add getQueryKey doc
This commit is contained in:
@@ -7,7 +7,17 @@ import { type DecoratedProcedureRecord } from './types'
|
|||||||
import { getCurrentInstance, onScopeDispose, useAsyncData } from '#imports'
|
import { getCurrentInstance, onScopeDispose, useAsyncData } from '#imports'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Calculates the key used for `useAsyncData` call
|
* Calculates the key used for `useAsyncData` call.
|
||||||
|
*
|
||||||
|
* @example
|
||||||
|
*
|
||||||
|
* ```ts
|
||||||
|
* import { getQueryKey } from 'trpc-nuxt/client'
|
||||||
|
*
|
||||||
|
* $client.todo.getTodo(1)
|
||||||
|
*
|
||||||
|
* const queryKey = getQueryKey('todo.getTodo', 1)
|
||||||
|
* ```
|
||||||
*/
|
*/
|
||||||
export function getQueryKey (
|
export function getQueryKey (
|
||||||
path: string,
|
path: string,
|
||||||
|
|||||||
Reference in New Issue
Block a user