mirror of
https://github.com/ArthurDanjou/trpc-nuxt.git
synced 2026-01-14 12:14:40 +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'
|
||||
|
||||
/**
|
||||
* 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 (
|
||||
path: string,
|
||||
|
||||
Reference in New Issue
Block a user