Compare commits

..

13 Commits

Author SHA1 Message Date
wobsoriano
230422bb16 docs: fix incorrect syntax 2023-08-23 12:49:09 -07:00
wobsoriano
057c8f8d3a docs: fix missing title 2023-08-23 12:48:32 -07:00
wobsoriano
9808375f31 docs: add response caching page 2023-08-23 12:46:22 -07:00
wobsoriano
8e893a2e30 chore(release): v0.10.11 2023-08-22 10:52:53 -07:00
wobsoriano
f74273190f bump local deps 2023-08-22 10:52:41 -07:00
wobsoriano
283400d41a chore(deps): bump ohash to 1.1.3 2023-08-22 10:51:54 -07:00
wobsoriano
5221dc0515 chore(deps): bump ofetch to 1.2.0 2023-08-22 10:51:29 -07:00
wobsoriano
299ae558ab fix: add missing useLazyQuery type 2023-08-22 10:48:44 -07:00
wobsoriano
f7eeb104b3 docs: bump @nuxt-themes/docus to 1.14.6 2023-08-22 10:36:36 -07:00
wobsoriano
c5c762190b chore(release): v0.10.10 2023-08-20 22:57:35 -07:00
wobsoriano
93cb44288c feat: add useLazyQuery composable 2023-08-20 22:57:31 -07:00
wobsoriano
ede749414d chore(release): v0.10.9 2023-08-20 22:51:01 -07:00
wobsoriano
f2bcf9b68b feat: add custom query key option 2023-08-20 22:50:48 -07:00
8 changed files with 448 additions and 118 deletions

View File

@@ -1,6 +1,46 @@
# Changelog
## v0.10.11
[compare changes](https://github.com/wobsoriano/trpc-nuxt/compare/v0.10.10...v0.10.11)
### 🩹 Fixes
- Add missing useLazyQuery type ([299ae55](https://github.com/wobsoriano/trpc-nuxt/commit/299ae55))
### 📖 Documentation
- Bump @nuxt-themes/docus to 1.14.6 ([f7eeb10](https://github.com/wobsoriano/trpc-nuxt/commit/f7eeb10))
### ❤️ Contributors
- Wobsoriano ([@wobsoriano](http://github.com/wobsoriano))
## v0.10.10
[compare changes](https://github.com/wobsoriano/trpc-nuxt/compare/v0.10.9...v0.10.10)
### 🚀 Enhancements
- Add useLazyQuery composable ([93cb442](https://github.com/wobsoriano/trpc-nuxt/commit/93cb442))
### ❤️ Contributors
- Wobsoriano ([@wobsoriano](http://github.com/wobsoriano))
## v0.10.9
[compare changes](https://github.com/wobsoriano/trpc-nuxt/compare/v0.10.8...v0.10.9)
### 🚀 Enhancements
- Add custom query key option ([f2bcf9b](https://github.com/wobsoriano/trpc-nuxt/commit/f2bcf9b))
### ❤️ Contributors
- Wobsoriano ([@wobsoriano](http://github.com/wobsoriano))
## v0.10.8
[compare changes](https://github.com/wobsoriano/trpc-nuxt/compare/v0.10.7...v0.10.8)

View File

@@ -0,0 +1,51 @@
---
title: Response Caching
---
## Response Caching
Your server responses must [satisfy some criteria](https://vercel.com/docs/concepts/functions/serverless-functions/edge-caching) in order for them to be cached (i.e. by Vercel's Edge Network). Please refer to [this section of the tRPC.io documentation](https://trpc.io/docs/caching) for more information.
The `createNuxtApiHandler` function conveniently allows you to specify a `responseMeta` function.
```ts [server/api/trpc/[trpc].ts]
import { createNuxtApiHandler } from 'trpc-nuxt'
import { appRouter } from '~/server/trpc/routers'
export default createNuxtApiHandler({
router: appRouter,
/**
* @link https://trpc.io/docs/caching#api-response-caching
*/
responseMeta(opts) {
// cache request for 1 day + revalidate once every second
const ONE_DAY_IN_SECONDS = 60 * 60 * 24;
return {
headers: {
'cache-control': `s-maxage=1, stale-while-revalidate=${ONE_DAY_IN_SECONDS}`,
},
};
},
})
```
You can also take advantage of Nitro's [Cache API](https://nitro.unjs.io/guide/cache#cache-api) if doing server-side calls:
```ts
import { appRouter } from '@/server/trpc/routers'
const caller = appRouter.createCaller({})
export default cachedEventHandler(async (event) => {
const { name } = getQuery(event)
const greeting = await caller.greeting({ name })
return {
greeting
}
}, {
swr: true, maxAge: 10
})
```

View File

@@ -8,7 +8,7 @@
"preview": "nuxi preview"
},
"devDependencies": {
"@nuxt-themes/docus": "^1.14.3",
"@nuxt-themes/docus": "^1.14.6",
"@nuxtlabs/github-module": "^1.6.3",
"nuxt": "3.6.5"
}

View File

@@ -3,7 +3,7 @@
"description": "End-to-end typesafe APIs in Nuxt applications.",
"type": "module",
"packageManager": "pnpm@8.6.9",
"version": "0.10.8",
"version": "0.10.11",
"license": "MIT",
"sideEffects": false,
"exports": {
@@ -40,14 +40,14 @@
},
"dependencies": {
"h3": "^1.8.0",
"ofetch": "^1.1.1",
"ohash": "^1.1.2"
"ofetch": "^1.2.0",
"ohash": "^1.1.3"
},
"devDependencies": {
"@nuxt/eslint-config": "^0.1.1",
"@trpc/client": "^10.37.1",
"@trpc/server": "^10.37.1",
"changelogen": "^0.5.4",
"changelogen": "^0.5.5",
"eslint": "^8.45.0",
"taze": "^0.11.2",
"tsup": "7.2.0",

View File

@@ -17,7 +17,7 @@ const addTodo = async () => {
}
}
const { data: todos, pending, error, refresh } = await $client.todo.getTodos.useQuery()
const { data: todos, pending, error, refresh } = await $client.todo.getTodos.useLazyQuery()
</script>
<template>

418
pnpm-lock.yaml generated
View File

@@ -17,11 +17,11 @@ importers:
specifier: ^1.8.0
version: 1.8.0
ofetch:
specifier: ^1.1.1
version: 1.1.1
specifier: ^1.2.0
version: 1.2.0
ohash:
specifier: ^1.1.2
version: 1.1.2
specifier: ^1.1.3
version: 1.1.3
devDependencies:
'@nuxt/eslint-config':
specifier: ^0.1.1
@@ -33,8 +33,8 @@ importers:
specifier: 10.37.1
version: 10.37.1
changelogen:
specifier: ^0.5.4
version: 0.5.4
specifier: ^0.5.5
version: 0.5.5
eslint:
specifier: ^8.45.0
version: 8.45.0
@@ -51,8 +51,8 @@ importers:
docs:
devDependencies:
'@nuxt-themes/docus':
specifier: ^1.14.3
version: 1.14.3(nuxt@3.6.5)(postcss@8.4.25)(rollup@3.26.2)(vue@3.3.4)
specifier: ^1.14.6
version: 1.14.6(nuxt@3.6.5)(postcss@8.4.25)(rollup@3.26.2)(vue@3.3.4)
'@nuxtlabs/github-module':
specifier: ^1.6.3
version: 1.6.3(rollup@3.26.2)
@@ -1218,13 +1218,13 @@ packages:
- supports-color
dev: true
/@nuxt-themes/docus@1.14.3(nuxt@3.6.5)(postcss@8.4.25)(rollup@3.26.2)(vue@3.3.4):
resolution: {integrity: sha512-GNTyyZSvNjWK7y0efIME7xY9YfV7kkDM8uWqeq5rCwHVUoYtwNFmhKEuBbCssmaGwx0kl031PuQOkLnUMdC2Dg==}
/@nuxt-themes/docus@1.14.6(nuxt@3.6.5)(postcss@8.4.25)(rollup@3.26.2)(vue@3.3.4):
resolution: {integrity: sha512-tkSG7j0jhVo53wEpK9V48hIvaK0XEzVU64hXhFfnIMv6LJu99cKOC//boebPbN9qLbJmkBdo4IAIJ0tN5MD0qw==}
dependencies:
'@nuxt-themes/elements': 0.9.4(postcss@8.4.25)(rollup@3.26.2)(vue@3.3.4)
'@nuxt-themes/tokens': 1.9.1(postcss@8.4.25)(rollup@3.26.2)(vue@3.3.4)
'@nuxt-themes/typography': 0.11.0(postcss@8.4.25)(rollup@3.26.2)(vue@3.3.4)
'@nuxt/content': 2.7.0(rollup@3.26.2)
'@nuxt/content': 2.7.2(rollup@3.26.2)
'@nuxthq/studio': 0.13.4(rollup@3.26.2)
'@vueuse/integrations': 10.2.1(focus-trap@7.5.2)(fuse.js@6.6.2)(vue@3.3.4)
'@vueuse/nuxt': 10.2.1(nuxt@3.6.5)(rollup@3.26.2)(vue@3.3.4)
@@ -1306,20 +1306,20 @@ packages:
- vue
dev: true
/@nuxt/content@2.7.0(rollup@3.26.2):
resolution: {integrity: sha512-3vv3Rbpf6NH7RRuy7PLVmpQCt8C9DgV4aTWLmTCdnWpmlNsX+0wQT8bA/ypqmh8zrJ6BXWztFM35WVESkNvDvQ==}
/@nuxt/content@2.7.2(rollup@3.26.2):
resolution: {integrity: sha512-fP0nrnyjtFbluKltKUtC7jSMFc1xAH+bwweZyLwXb3gkIap2EHlVL+e9ptGt39+4HIkRkLgME7TNr/fUO+CHug==}
dependencies:
'@nuxt/kit': 3.6.2(rollup@3.26.2)
'@nuxt/kit': 3.6.5(rollup@3.26.2)
consola: 3.2.3
defu: 6.1.2
destr: 1.2.2
destr: 2.0.1
detab: 3.0.2
json5: 2.2.3
knitwork: 1.0.0
listhen: 1.0.4
listhen: 1.3.0
mdast-util-to-hast: 12.3.0
mdurl: 1.0.1
ohash: 1.1.2
ohash: 1.1.3
pathe: 1.1.1
property-information: 6.2.0
rehype-external-links: 2.1.0
@@ -1327,22 +1327,22 @@ packages:
rehype-slug: 5.1.0
rehype-sort-attribute-values: 4.0.0
rehype-sort-attributes: 4.0.0
remark-emoji: 3.1.1
remark-emoji: 3.1.2
remark-gfm: 3.0.1
remark-mdc: 1.1.3
remark-parse: 10.0.2
remark-rehype: 10.1.0
remark-squeeze-paragraphs: 5.0.1
scule: 1.0.0
shiki-es: 0.2.0
shiki-es: 0.14.0
slugify: 1.6.6
socket.io-client: 4.7.1
ufo: 1.2.0
unified: 10.1.2
unist-builder: 3.0.1
unist-util-position: 4.0.4
unist-util-stringify-position: 3.0.3
unist-util-visit: 4.1.2
unist-builder: 4.0.0
unist-util-position: 5.0.0
unist-util-stringify-position: 4.0.0
unist-util-visit: 5.0.0
unstorage: 1.8.0
ws: 8.13.0
transitivePeerDependencies:
@@ -1492,32 +1492,6 @@ packages:
- supports-color
dev: true
/@nuxt/kit@3.6.2(rollup@3.26.2):
resolution: {integrity: sha512-X1WN76izsILva6TvQVTfJCHG7TXCwsB6jsxZKcU3qSog26jer5dildDb5ZmKL3e+IFD6BwK4ShO/py8VZcT6OA==}
engines: {node: ^14.18.0 || >=16.10.0}
dependencies:
'@nuxt/schema': 3.6.2(rollup@3.26.2)
c12: 1.4.2
consola: 3.2.3
defu: 6.1.2
globby: 13.2.2
hash-sum: 2.0.0
ignore: 5.2.4
jiti: 1.19.1
knitwork: 1.0.0
mlly: 1.4.0
pathe: 1.1.1
pkg-types: 1.0.3
scule: 1.0.0
semver: 7.5.4
unctx: 2.3.1
unimport: 3.0.14(rollup@3.26.2)
untyped: 1.3.2
transitivePeerDependencies:
- rollup
- supports-color
dev: true
/@nuxt/kit@3.6.5(rollup@3.26.2):
resolution: {integrity: sha512-uBI5I2Zx6sk+vRHU+nBmifwxg/nyXCGZ1g5hUKrUfgv1ZfiKB8JkN5T9iRoduDOaqbwM6XSnEl1ja73iloDcrw==}
engines: {node: ^14.18.0 || >=16.10.0}
@@ -1566,24 +1540,6 @@ packages:
- supports-color
dev: true
/@nuxt/schema@3.6.2(rollup@3.26.2):
resolution: {integrity: sha512-wxb1/C5ozly5IwX0IRjVGml1n2KjZrTKsf6lTk3fdjUpW105kAvYX4j66PDOdBRE4vCwCsgaHJfWpUSeNBxbuA==}
engines: {node: ^14.18.0 || >=16.10.0}
dependencies:
defu: 6.1.2
hookable: 5.5.3
pathe: 1.1.1
pkg-types: 1.0.3
postcss-import-resolver: 2.0.0
std-env: 3.3.3
ufo: 1.2.0
unimport: 3.0.14(rollup@3.26.2)
untyped: 1.3.2
transitivePeerDependencies:
- rollup
- supports-color
dev: true
/@nuxt/schema@3.6.5(rollup@3.26.2):
resolution: {integrity: sha512-UPUnMB0W5TZ/Pi1fiF71EqIsPlj8LGZqzhSf8wOeh538KHwxbA9r7cuvEUU92eXRksOZaylbea3fJxZWhOITVw==}
engines: {node: ^14.18.0 || >=16.10.0}
@@ -1621,7 +1577,7 @@ packages:
mri: 1.2.0
nanoid: 4.0.2
node-fetch: 3.3.1
ofetch: 1.1.1
ofetch: 1.2.0
parse-git-config: 3.0.0
rc9: 2.1.1
std-env: 3.3.3
@@ -1659,7 +1615,7 @@ packages:
knitwork: 1.0.0
magic-string: 0.30.1
mlly: 1.4.0
ohash: 1.1.2
ohash: 1.1.3
pathe: 1.1.1
perfect-debounce: 1.0.0
pkg-types: 1.0.3
@@ -1698,7 +1654,7 @@ packages:
/@nuxthq/studio@0.13.4(rollup@3.26.2):
resolution: {integrity: sha512-+Jn0iN6TvRTTtTBX4qXWhtOMLL4rsyUIX3/9HM+eBAwr5/cELLw3RuI1tgp942QteTi7PvI5Av4nEi6BlLBr+A==}
dependencies:
'@nuxt/kit': 3.6.2(rollup@3.26.2)
'@nuxt/kit': 3.6.5(rollup@3.26.2)
defu: 6.1.2
nuxt-component-meta: 0.5.1(rollup@3.26.2)
nuxt-config-schema: 0.4.6(rollup@3.26.2)
@@ -1714,7 +1670,7 @@ packages:
/@nuxtjs/color-mode@3.2.0(rollup@3.26.2):
resolution: {integrity: sha512-isDR01yfadopiHQ/VEVUpyNSPrk5PCjUHS4t1qYRZwuRGefU4s9Iaxf6H9nmr1QFzoMgTm+3T0r/54jLwtpZbA==}
dependencies:
'@nuxt/kit': 3.6.2(rollup@3.26.2)
'@nuxt/kit': 3.6.5(rollup@3.26.2)
lodash.template: 4.5.0
pathe: 1.1.1
transitivePeerDependencies:
@@ -1865,6 +1821,126 @@ packages:
'@octokit/openapi-types': 17.1.2
dev: true
/@parcel/watcher-android-arm64@2.2.0:
resolution: {integrity: sha512-nU2wh00CTQT9rr1TIKTjdQ9lAGYpmz6XuKw0nAwAN+S2A5YiD55BK1u+E5WMCT8YOIDe/n6gaj4o/Bi9294SSQ==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [android]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-darwin-arm64@2.2.0:
resolution: {integrity: sha512-cJl0UZDcodciy3TDMomoK/Huxpjlkkim3SyMgWzjovHGOZKNce9guLz2dzuFwfObBFCjfznbFMIvAZ5syXotYw==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-darwin-x64@2.2.0:
resolution: {integrity: sha512-QI77zxaGrCV1StKcoRYfsUfmUmvPMPfQrubkBBy5XujV2fwaLgZivQOTQMBgp5K2+E19u1ufpspKXAPqSzpbyg==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [darwin]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-linux-arm-glibc@2.2.0:
resolution: {integrity: sha512-I2GPBcAXazPzabCmfsa3HRRW+MGlqxYd8g8RIueJU+a4o5nyNZDz0CR1cu0INT0QSQXEZV7w6UE8Hz9CF8u3Pg==}
engines: {node: '>= 10.0.0'}
cpu: [arm]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-linux-arm64-glibc@2.2.0:
resolution: {integrity: sha512-St5mlfp+2lS9AmgixUqfwJa/DwVmTCJxC1HcOubUTz6YFOKIlkHCeUa1Bxi4E/tR/HSez8+heXHL8HQkJ4Bd8g==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-linux-arm64-musl@2.2.0:
resolution: {integrity: sha512-jS+qfhhoOBVWwMLP65MaG8xdInMK30pPW8wqTCg2AAuVJh5xepMbzkhHJ4zURqHiyY3EiIRuYu4ONJKCxt8iqA==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-linux-x64-glibc@2.2.0:
resolution: {integrity: sha512-xJvJ7R2wJdi47WZBFS691RDOWvP1j/IAs3EXaWVhDI8FFITbWrWaln7KoNcR0Y3T+ZwimFY/cfb0PNht1q895g==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-linux-x64-musl@2.2.0:
resolution: {integrity: sha512-D+NMpgr23a+RI5mu8ZPKWy7AqjBOkURFDgP5iIXXEf/K3hm0jJ3ogzi0Ed2237B/CdYREimCgXyeiAlE/FtwyA==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [linux]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-wasm@2.3.0-alpha.1:
resolution: {integrity: sha512-wo6065l1MQ6SJPPchYw/q8J+pFL40qBXLu4Td2CXeQ/+mUk8NenNqC75P/P1Cyvpam0kfk91iszd+XL+xKDQww==}
engines: {node: '>= 10.0.0'}
dependencies:
is-glob: 4.0.3
micromatch: 4.0.5
napi-wasm: 1.1.0
dev: true
/@parcel/watcher-win32-arm64@2.2.0:
resolution: {integrity: sha512-z225cPn3aygJsyVUOWwfyW+fY0Tvk7N3XCOl66qUPFxpbuXeZuiuuJemmtm8vxyqa3Ur7peU/qJxrpC64aeI7Q==}
engines: {node: '>= 10.0.0'}
cpu: [arm64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher-win32-x64@2.2.0:
resolution: {integrity: sha512-JqGW0RJ61BkKx+yYzIURt9s53P7xMVbv0uxYPzAXLBINGaFmkIKSuUPyBVfy8TMbvp93lvF4SPBNDzVRJfvgOw==}
engines: {node: '>= 10.0.0'}
cpu: [x64]
os: [win32]
requiresBuild: true
dev: true
optional: true
/@parcel/watcher@2.2.0:
resolution: {integrity: sha512-71S4TF+IMyAn24PK4KSkdKtqJDR3zRzb0HE3yXpacItqTM7XfF2f5q9NEGLEVl0dAaBAGfNwDCjH120y25F6Tg==}
engines: {node: '>= 10.0.0'}
dependencies:
detect-libc: 1.0.3
is-glob: 4.0.3
micromatch: 4.0.5
node-addon-api: 7.0.0
optionalDependencies:
'@parcel/watcher-android-arm64': 2.2.0
'@parcel/watcher-darwin-arm64': 2.2.0
'@parcel/watcher-darwin-x64': 2.2.0
'@parcel/watcher-linux-arm-glibc': 2.2.0
'@parcel/watcher-linux-arm64-glibc': 2.2.0
'@parcel/watcher-linux-arm64-musl': 2.2.0
'@parcel/watcher-linux-x64-glibc': 2.2.0
'@parcel/watcher-linux-x64-musl': 2.2.0
'@parcel/watcher-win32-arm64': 2.2.0
'@parcel/watcher-win32-x64': 2.2.0
dev: true
/@pkgjs/parseargs@0.11.0:
resolution: {integrity: sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==}
engines: {node: '>=14'}
@@ -2164,6 +2240,10 @@ packages:
resolution: {integrity: sha512-PBjIUxZHOuj0R15/xuwJYjFi+KZdNFrehocChv4g5hu6aFroHue8m0lBP0POdK2nKzbw0cgV1mws8+V/JAcEkQ==}
dev: true
/@types/unist@3.0.0:
resolution: {integrity: sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==}
dev: true
/@types/web-bluetooth@0.0.16:
resolution: {integrity: sha512-oh8q2Zc32S6gd/j50GowEjKLoOVOwHP/bWVjKJInBwQqdOYMdPrf1oVlelTlyfFK3CKxL1uahMDAr+vy8T7yMQ==}
dev: true
@@ -2548,7 +2628,7 @@ packages:
'@vue/reactivity-transform': 3.3.0-alpha.6
'@vue/shared': 3.3.0-alpha.6
estree-walker: 2.0.2
magic-string: 0.30.1
magic-string: 0.30.2
postcss: 8.4.25
source-map: 0.6.1
dev: true
@@ -2593,7 +2673,7 @@ packages:
'@vue/compiler-core': 3.3.0-alpha.6
'@vue/shared': 3.3.0-alpha.6
estree-walker: 2.0.2
magic-string: 0.30.1
magic-string: 0.30.2
dev: true
/@vue/reactivity-transform@3.3.4:
@@ -2739,7 +2819,7 @@ packages:
peerDependencies:
nuxt: ^3.0.0
dependencies:
'@nuxt/kit': 3.6.2(rollup@3.26.2)
'@nuxt/kit': 3.6.5(rollup@3.26.2)
'@vueuse/core': 10.2.1(vue@3.3.4)
'@vueuse/metadata': 10.2.1
local-pkg: 0.4.3
@@ -3246,7 +3326,7 @@ packages:
giget: 1.1.2
jiti: 1.19.1
mlly: 1.4.0
ohash: 1.1.2
ohash: 1.1.3
pathe: 1.1.1
perfect-debounce: 1.0.0
pkg-types: 1.0.3
@@ -3397,24 +3477,24 @@ packages:
tslib: 2.5.0
dev: true
/changelogen@0.5.4:
resolution: {integrity: sha512-ady7TjLW3ZKMWzVF8MG3vJRqLVctNTGIZnO5XoFbMbcC59BVNTZXNXL8tovB+OK6DHLk4NeTHUWzdwMaKmFyUA==}
/changelogen@0.5.5:
resolution: {integrity: sha512-IzgToIJ/R9NhVKmL+PW33ozYkv53bXvufDNUSH3GTKXq1iCHGgkbgbtqEWbo8tnWNnt7nPDpjL8PwSG2iS8RVw==}
hasBin: true
dependencies:
c12: 1.4.2
colorette: 2.0.20
consola: 3.2.3
convert-gitmoji: 0.1.3
execa: 7.1.1
execa: 8.0.1
mri: 1.2.0
node-fetch-native: 1.2.0
ofetch: 1.1.1
node-fetch-native: 1.3.1
ofetch: 1.2.0
open: 9.1.0
pathe: 1.1.1
pkg-types: 1.0.3
scule: 1.0.0
semver: 7.5.4
std-env: 3.3.3
std-env: 3.4.2
yaml: 2.3.1
transitivePeerDependencies:
- supports-color
@@ -3469,6 +3549,12 @@ packages:
resolution: {integrity: sha512-fL/EEp9TyXlNkgYFQYNqtMJhnAk2tAq8lCST7O5LPn1NrzWPsOKE5wafR7J+8W87oxqolpxNli+w7khq5WP7tg==}
dev: true
/citty@0.1.2:
resolution: {integrity: sha512-Me9nf0/BEmMOnuQzMOVXgpzkMUNbd0Am8lTl/13p0aRGAoLGk5T5sdet/42CrIGmWdG67BgHUhcKK1my1ujUEg==}
dependencies:
consola: 3.2.3
dev: true
/clean-stack@2.2.0:
resolution: {integrity: sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==}
engines: {node: '>=6'}
@@ -3899,7 +3985,7 @@ packages:
dependencies:
bundle-name: 3.0.0
default-browser-id: 3.0.0
execa: 7.1.1
execa: 7.2.0
titleize: 3.0.0
dev: true
@@ -3963,6 +4049,7 @@ packages:
/destr@2.0.0:
resolution: {integrity: sha512-FJ9RDpf3GicEBvzI3jxc2XhHzbqD8p4ANw/1kPsFBfTvP1b7Gn/Lg1vO7R9J4IVgoMbyUmFrFGZafJ1hPZpvlg==}
dev: true
/destr@2.0.1:
resolution: {integrity: sha512-M1Ob1zPSIvlARiJUkKqvAZ3VAqQY6Jcuth/pBKQ2b1dX/Qx0OnJ8Vux6J2H5PTMQeRzWrrbTu70VxBfv/OPDJA==}
@@ -3981,6 +4068,12 @@ packages:
engines: {node: '>=12.20'}
dev: true
/detect-libc@1.0.3:
resolution: {integrity: sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==}
engines: {node: '>=0.10'}
hasBin: true
dev: true
/detect-libc@2.0.1:
resolution: {integrity: sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==}
engines: {node: '>=8'}
@@ -4471,6 +4564,21 @@ packages:
strip-final-newline: 3.0.0
dev: true
/execa@8.0.1:
resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==}
engines: {node: '>=16.17'}
dependencies:
cross-spawn: 7.0.3
get-stream: 8.0.1
human-signals: 5.0.0
is-stream: 3.0.0
merge-stream: 2.0.0
npm-run-path: 5.1.0
onetime: 6.0.0
signal-exit: 4.1.0
strip-final-newline: 3.0.0
dev: true
/extend@3.0.2:
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==}
dev: true
@@ -4785,6 +4893,11 @@ packages:
engines: {node: '>=10'}
dev: true
/get-stream@8.0.1:
resolution: {integrity: sha512-VaUJspBffn/LMCJVoMvSAdmscJyS1auj5Zulnn5UoYcY531UWmdwhRWkcGKnGU93m5HSXP9LP2usOryrBtQowA==}
engines: {node: '>=16'}
dev: true
/get-tsconfig@4.6.2:
resolution: {integrity: sha512-E5XrT4CbbXcXWy+1jChlZmrmCwd5KGx502kDCXJJ7y898TtWW9FwoG5HfOLVRKmlmDGkWN2HM9Ho+/Y8F0sJDg==}
dependencies:
@@ -5242,6 +5355,11 @@ packages:
engines: {node: '>=14.18.0'}
dev: true
/human-signals@5.0.0:
resolution: {integrity: sha512-AXcZb6vzzrFAUE61HnN4mpLqd/cSIwNQjtNWR0euPm6y0iqx3G4gOXaIDdtdDwZmhwe82LA6+zinmW4UBWVePQ==}
engines: {node: '>=16.17.0'}
dev: true
/humanize-ms@1.2.1:
resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==}
dependencies:
@@ -5737,6 +5855,28 @@ packages:
ufo: 1.2.0
dev: true
/listhen@1.3.0:
resolution: {integrity: sha512-QhlP01ReqSXpu8OgBaFQjYMU/4YJTCWLFtoDTxBhitPQWfu0UuBoG2HizMysaRkUEAr/CVxB/20T8ni0zQDPtw==}
hasBin: true
dependencies:
'@parcel/watcher': 2.2.0
'@parcel/watcher-wasm': 2.3.0-alpha.1
citty: 0.1.2
clipboardy: 3.0.0
consola: 3.2.3
defu: 6.1.2
get-port-please: 3.0.1
h3: 1.8.0
http-shutdown: 1.2.2
jiti: 1.19.1
mlly: 1.4.0
node-forge: 1.3.1
pathe: 1.1.1
ufo: 1.2.0
untun: 0.1.1
uqr: 0.1.2
dev: true
/load-tsconfig@0.2.3:
resolution: {integrity: sha512-iyT2MXws+dc2Wi6o3grCFtGXpeMvHmJqS27sMPGtV2eUu4PeFnG+33I8BlFK1t1NWMjOpcx9bridn5yxLDX2gQ==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@@ -6649,6 +6789,10 @@ packages:
hasBin: true
dev: true
/napi-wasm@1.1.0:
resolution: {integrity: sha512-lHwIAJbmLSjF9VDRm9GoVOy9AGp3aIvkjv+Kvz9h16QR3uSVYH78PNQUnT2U4X53mhlnV2M7wrhibQ3GHicDmg==}
dev: true
/natural-compare-lite@1.4.0:
resolution: {integrity: sha512-Tj+HTDSJJKaZnfiuw+iaF9skdPpTo2GtEly5JHnWV/hfv2Qj/9RKsGISQtLh2ox3l5EAGw487hnBee0sIJ6v2g==}
dev: true
@@ -6710,8 +6854,8 @@ packages:
mlly: 1.4.0
mri: 1.2.0
node-fetch-native: 1.2.0
ofetch: 1.1.1
ohash: 1.1.2
ofetch: 1.2.0
ohash: 1.1.3
openapi-typescript: 6.3.2
pathe: 1.1.1
perfect-debounce: 1.0.0
@@ -6753,6 +6897,10 @@ packages:
tslib: 2.5.0
dev: true
/node-addon-api@7.0.0:
resolution: {integrity: sha512-vgbBJTS4m5/KkE16t5Ly0WW9hz46swAstv0hYYwMtbG7AznRhNyfLRe8HZAiWIpcHzoO7HxhLuBQj9rJ/Ho0ZA==}
dev: true
/node-domexception@1.0.0:
resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==}
engines: {node: '>=10.5.0'}
@@ -6771,6 +6919,9 @@ packages:
/node-fetch-native@1.2.0:
resolution: {integrity: sha512-5IAMBTl9p6PaAjYCnMv5FmqIF6GcZnawAVnzaCG0rX2aYZJ4CxEkZNtVPuTRug7fL7wyM5BQYTlAzcyMPi6oTQ==}
/node-fetch-native@1.3.1:
resolution: {integrity: sha512-Z1q9inzb0c2+FuByzG5P2rHaNe3CEYLPqJywun4M/eOI0IHB3K9TDINfb1VA20vWFsW2rWUMaGIo87R3zwpMug==}
/node-fetch@2.6.9:
resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==}
engines: {node: 4.x || >=6.0.0}
@@ -6981,7 +7132,7 @@ packages:
/nuxt-component-meta@0.5.1(rollup@3.26.2):
resolution: {integrity: sha512-vwx5wySyVX+QbFrNb3wLYNMPlADho8E66MO45d5i5fTlEkmhopVpQ9YXwlAvM3pLCPjupxG3R3D5rKpLDeitkw==}
dependencies:
'@nuxt/kit': 3.6.2(rollup@3.26.2)
'@nuxt/kit': 3.6.5(rollup@3.26.2)
scule: 1.0.0
typescript: 5.1.6
vue-component-meta: 1.2.0(typescript@5.1.6)
@@ -6993,7 +7144,7 @@ packages:
/nuxt-config-schema@0.4.6(rollup@3.26.2):
resolution: {integrity: sha512-kHLWJFynj5QrxVZ1MjY2xmDaTSN1BCMLGExA+hMMLoCb3wn9TJlDVqnE/nSdUJPMRkNn/NQ5WP9NLA9vlAXRUw==}
dependencies:
'@nuxt/kit': 3.6.2(rollup@3.26.2)
'@nuxt/kit': 3.6.5(rollup@3.26.2)
defu: 6.1.2
jiti: 1.19.1
pathe: 1.1.1
@@ -7007,7 +7158,7 @@ packages:
resolution: {integrity: sha512-KdhJAigBGTP8/YIFZ3orwetk40AgLq6VQ5HRYuDLmv5hiDptor9Ro+WIdZggHw7nciRxZvDdQkEwi9B5G/jrkQ==}
dependencies:
'@iconify/vue': 4.1.1(vue@3.3.4)
'@nuxt/kit': 3.6.2(rollup@3.26.2)
'@nuxt/kit': 3.6.5(rollup@3.26.2)
nuxt-config-schema: 0.4.6(rollup@3.26.2)
transitivePeerDependencies:
- rollup
@@ -7139,9 +7290,21 @@ packages:
destr: 2.0.0
node-fetch-native: 1.2.0
ufo: 1.2.0
dev: true
/ofetch@1.2.0:
resolution: {integrity: sha512-R8CM00cUpy/+PS8jyf/8ijTgKNSOhrAap77DJD5hck6eNChMvJkz/lmN7HaxZW0BlCIVMWmgmDYRwALsc5ypPw==}
dependencies:
destr: 2.0.1
node-fetch-native: 1.3.1
ufo: 1.2.0
/ohash@1.1.2:
resolution: {integrity: sha512-9CIOSq5945rI045GFtcO3uudyOkYVY1nyfFxVQp+9BRgslr8jPNiSSrsFGg/BNTUFOLqx0P5tng6G32brIPw0w==}
dev: true
/ohash@1.1.3:
resolution: {integrity: sha512-zuHHiGTYTA1sYJ/wZN+t5HKZaH23i4yI1HMwbuXm24Nid7Dv0KcuRlKoNKS9UNfAVSBlnGLcuQrnOKWOZoEGaw==}
/on-finished@2.4.1:
resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==}
@@ -7422,9 +7585,9 @@ packages:
consola: 2.15.3
csstype: 3.1.2
defu: 6.1.2
magic-string: 0.30.1
magic-string: 0.30.2
nanoid: 4.0.2
ohash: 1.1.2
ohash: 1.1.3
paneer: 0.1.0
pathe: 1.1.1
postcss-custom-properties: 13.1.4(postcss@8.4.25)
@@ -7434,7 +7597,7 @@ packages:
scule: 1.0.0
style-dictionary-esm: 1.3.7
unbuild: 1.2.0
unplugin: 1.3.2
unplugin: 1.4.0
transitivePeerDependencies:
- postcss
- sass
@@ -8097,8 +8260,8 @@ packages:
unist-util-visit: 4.1.2
dev: true
/remark-emoji@3.1.1:
resolution: {integrity: sha512-kVCTaHzX+/ls67mE8JsGd3ZX511p2FlAPmKhdGpRCb5z6GSwp+3sAIB5oTySIetPh7CtqfGf7JBUt5fyMjgOHw==}
/remark-emoji@3.1.2:
resolution: {integrity: sha512-QwhAzNk27Ol64uV4z/3n55MKrNz9bhr8wg+mO5aGqIYDS+jUarS1d8Y0ZIeEBVhfGkXj6gGYM+727sOgAPvV/A==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
dependencies:
emoticon: 4.0.1
@@ -8231,7 +8394,7 @@ packages:
rollup: ^3.0.0
typescript: ^4.1 || ^5.0
dependencies:
magic-string: 0.30.1
magic-string: 0.30.2
rollup: 3.26.2
typescript: 5.1.6
optionalDependencies:
@@ -8412,8 +8575,8 @@ packages:
resolution: {integrity: sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==}
dev: true
/shiki-es@0.2.0:
resolution: {integrity: sha512-RbRMD+IuJJseSZljDdne9ThrUYrwBwJR04FvN4VXpfsU3MNID5VJGHLAD5je/HGThCyEKNgH+nEkSFEWKD7C3Q==}
/shiki-es@0.14.0:
resolution: {integrity: sha512-e+/aueHx0YeIEut6RXC6K8gSf0PykwZiHD7q7AHtpTW8Kd8TpFUIWqTwhAnrGjOyOMyrwv+syr5WPagMpDpVYQ==}
dev: true
/signal-exit@3.0.7:
@@ -8425,6 +8588,11 @@ packages:
engines: {node: '>=14'}
dev: true
/signal-exit@4.1.0:
resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==}
engines: {node: '>=14'}
dev: true
/sigstore@1.5.0:
resolution: {integrity: sha512-i3nhvdobiPj8XrXNIggjeur6+A5iAQ4f+r1bR5SGitFJBbthy/6c7Fz0h+kY70Wua1FSMdDr/UEhXSVRXNpynw==}
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
@@ -8610,6 +8778,10 @@ packages:
resolution: {integrity: sha512-Rz6yejtVyWnVjC1RFvNmYL10kgjC49EOghxWn0RFqlCHGFpQx+Xe7yW3I4ceK1SGrWIGMjD5Kbue8W/udkbMJg==}
dev: true
/std-env@3.4.2:
resolution: {integrity: sha512-Cw6eJDX9AxEEL0g5pYj8Zx9KXtDf60rxwS2ze0HBanS0aKhj1sBlzcsmg+R0qYy8byFa854/yR2X5ZmBSClVmg==}
dev: true
/streamsearch@1.1.0:
resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==}
engines: {node: '>=10.0.0'}
@@ -9112,7 +9284,7 @@ packages:
globby: 13.2.2
hookable: 5.5.3
jiti: 1.19.1
magic-string: 0.30.1
magic-string: 0.30.2
mkdist: 1.2.0(typescript@5.1.6)
mlly: 1.4.0
mri: 1.2.0
@@ -9294,10 +9466,10 @@ packages:
imurmurhash: 0.1.4
dev: true
/unist-builder@3.0.1:
resolution: {integrity: sha512-gnpOw7DIpCA0vpr6NqdPvTWnlPTApCTRzr+38E6hCWx3rz/cjo83SsKIlS1Z+L5ttScQ2AwutNnb8+tAvpb6qQ==}
/unist-builder@4.0.0:
resolution: {integrity: sha512-wmRFnH+BLpZnTKpc5L7O67Kac89s9HMrtELpnNaE6TAobq5DTZZs5YaTQfAZBA9bFPECx2uVAPO31c+GVug8mg==}
dependencies:
'@types/unist': 2.0.6
'@types/unist': 3.0.0
dev: true
/unist-util-generated@2.0.0:
@@ -9308,12 +9480,24 @@ packages:
resolution: {integrity: sha512-F5CZ68eYzuSvJjGhCLPL3cYx45IxkqXSetCcRgUXtbcm50X2L9oOWQlfUfDdAf+6Pd27YDblBfdtmsThXmwpbQ==}
dev: true
/unist-util-is@6.0.0:
resolution: {integrity: sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==}
dependencies:
'@types/unist': 3.0.0
dev: true
/unist-util-position@4.0.4:
resolution: {integrity: sha512-kUBE91efOWfIVBo8xzh/uZQ7p9ffYRtUbMRZBNFYwf0RK8koUMx6dGUfwylLOKmaT2cs4wSW96QoYUSXAyEtpg==}
dependencies:
'@types/unist': 2.0.6
dev: true
/unist-util-position@5.0.0:
resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==}
dependencies:
'@types/unist': 3.0.0
dev: true
/unist-util-remove@3.1.0:
resolution: {integrity: sha512-rO/sIghl13eN8irs5OBN2a4RC10MsJdiePCfwrvnzGtgIbHcDXr2REr0qi9F2r/CIb1r9FyyFmcMRIGs+EyUFw==}
dependencies:
@@ -9328,10 +9512,10 @@ packages:
'@types/unist': 2.0.6
dev: true
/unist-util-stringify-position@3.0.3:
resolution: {integrity: sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==}
/unist-util-stringify-position@4.0.0:
resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==}
dependencies:
'@types/unist': 2.0.6
'@types/unist': 3.0.0
dev: true
/unist-util-visit-parents@5.1.1:
@@ -9341,6 +9525,13 @@ packages:
unist-util-is: 5.1.1
dev: true
/unist-util-visit-parents@6.0.1:
resolution: {integrity: sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==}
dependencies:
'@types/unist': 3.0.0
unist-util-is: 6.0.0
dev: true
/unist-util-visit@4.1.2:
resolution: {integrity: sha512-MSd8OUGISqHdVvfY9TPhyK2VdUrPgxkUtWSuMHF6XAAFuL4LokseigBnZtPnJMu+FbynTkFNnFlyjxpVKujMRg==}
dependencies:
@@ -9349,6 +9540,14 @@ packages:
unist-util-visit-parents: 5.1.1
dev: true
/unist-util-visit@5.0.0:
resolution: {integrity: sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==}
dependencies:
'@types/unist': 3.0.0
unist-util-is: 6.0.0
unist-util-visit-parents: 6.0.1
dev: true
/universal-user-agent@6.0.0:
resolution: {integrity: sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==}
dev: true
@@ -9453,7 +9652,7 @@ packages:
lru-cache: 10.0.0
mri: 1.2.0
node-fetch-native: 1.2.0
ofetch: 1.1.1
ofetch: 1.2.0
ufo: 1.2.0
transitivePeerDependencies:
- supports-color
@@ -9464,6 +9663,15 @@ packages:
engines: {node: '>=8'}
dev: true
/untun@0.1.1:
resolution: {integrity: sha512-Xyo/3TLi2pMLr8SFSXAHVTEpEtVrqXZTzXkZAglRIairiO+utD6y7bCemYejj7GazEwomMwpNB1Gg3hoehY+zA==}
hasBin: true
dependencies:
citty: 0.1.2
consola: 3.2.3
pathe: 1.1.1
dev: true
/untyped@1.3.2:
resolution: {integrity: sha512-z219Z65rOGD6jXIvIhpZFfwWdqQckB8sdZec2NO+TkcH1Bph7gL0hwLzRJs1KsOo4Jz4mF9guBXhsEnyEBGVfw==}
hasBin: true
@@ -9502,6 +9710,10 @@ packages:
tslib: 2.5.0
dev: true
/uqr@0.1.2:
resolution: {integrity: sha512-MJu7ypHq6QasgF5YRTjqscSzQp/W11zoUk6kvmlH+fmWEs63Y0Eib13hYFwAzagRJcVY8WVnlV+eBDUGMJ5IbA==}
dev: true
/uri-js@4.4.1:
resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==}
dependencies:

View File

@@ -40,8 +40,8 @@ export function createNuxtProxyDecoration<TRouter extends AnyRouter> (name: stri
const [input, otherOptions] = args
if (lastArg === 'useQuery') {
const { trpc, ...asyncDataOptions } = otherOptions || {} as any
if (['useQuery', 'useLazyQuery'].includes(lastArg)) {
const { trpc, queryKey: customQueryKey, ...asyncDataOptions } = otherOptions || {} as any
let controller: AbortController
@@ -54,13 +54,17 @@ export function createNuxtProxyDecoration<TRouter extends AnyRouter> (name: stri
controller = typeof AbortController !== 'undefined' ? new AbortController() : {} as AbortController
}
const queryKey = getQueryKey(path, unref(input))
const queryKey = customQueryKey || getQueryKey(path, unref(input))
const watch = isRef(input) ? [...(asyncDataOptions.watch || []), input] : asyncDataOptions.watch
const isLazy = lastArg === 'useLazyQuery' ? true : (asyncDataOptions.lazy || false)
return useAsyncData(queryKey, () => (client as any)[path].query(unref(input), {
signal: controller?.signal,
...trpc
}), {
...asyncDataOptions,
watch: isRef(input) ? [...(asyncDataOptions.watch || []), input] : asyncDataOptions.watch
watch,
lazy: isLazy
})
}

View File

@@ -53,13 +53,36 @@ type DecorateProcedure<
> = TProcedure extends AnyQueryProcedure
? {
useQuery: <
ResT = inferTransformedProcedureOutput<TProcedure>,
DataE = TRPCClientErrorLike<TProcedure>,
DataT = ResT,
PickKeys extends KeysOf<DataT> = KeysOf<DataT>,
ResT = inferTransformedProcedureOutput<TProcedure>,
DataE = TRPCClientErrorLike<TProcedure>,
DataT = ResT,
PickKeys extends KeysOf<DataT> = KeysOf<DataT>,
>(
input: MaybeRef<inferProcedureInput<TProcedure>>,
opts?: AsyncDataOptions<ResT, DataT, PickKeys> & { trpc?: TRPCRequestOptions },
opts?: AsyncDataOptions<ResT, DataT, PickKeys> & {
trpc?: TRPCRequestOptions
/**
* The custom unique key to use.
* @see https://nuxt.com/docs/api/composables/use-async-data#params
*/
queryKey?: string
},
) => AsyncData<PickFrom<DataT, PickKeys> | null, DataE>,
useLazyQuery: <
ResT = inferTransformedProcedureOutput<TProcedure>,
DataE = TRPCClientErrorLike<TProcedure>,
DataT = ResT,
PickKeys extends KeysOf<DataT> = KeysOf<DataT>,
>(
input: MaybeRef<inferProcedureInput<TProcedure>>,
opts?: Omit<AsyncDataOptions<ResT, DataT, PickKeys>, 'lazy'> & {
trpc?: TRPCRequestOptions
/**
* The custom unique key to use.
* @see https://nuxt.com/docs/api/composables/use-async-data#params
*/
queryKey?: string
},
) => AsyncData<PickFrom<DataT, PickKeys> | null, DataE>,
query: Resolver<TProcedure>
} : TProcedure extends AnyMutationProcedure ? {