Gathering detailed insights and metrics for @orpc/vue-query
Gathering detailed insights and metrics for @orpc/vue-query
Gathering detailed insights and metrics for @orpc/vue-query
Gathering detailed insights and metrics for @orpc/vue-query
npm install @orpc/vue-query
Typescript
Module System
Node Version
NPM Version
TypeScript (99.24%)
Vue (0.37%)
JavaScript (0.14%)
Svelte (0.13%)
HTML (0.07%)
CSS (0.03%)
Astro (0.01%)
Total Downloads
40,127
Last Day
23
Last Week
2,364
Last Month
8,049
Last Year
40,127
MIT License
3,231 Stars
989 Commits
72 Forks
8 Watchers
433 Branches
34 Contributors
Updated on Aug 31, 2025
Latest Version
1.8.5
Package Id
@orpc/vue-query@1.8.5
Unpacked Size
29.85 kB
Size
6.16 kB
File Count
6
NPM Version
10.8.2
Node Version
20.19.4
Published on
Aug 25, 2025
Cumulative downloads
Total Downloads
Last Day
4.5%
23
Compared to previous day
Last Week
22.9%
2,364
Compared to previous week
Last Month
35.4%
8,049
Compared to previous month
Last Year
0%
40,127
Compared to previous year
2
3
1
oRPC is a powerful combination of RPC and OpenAPI, makes it easy to build APIs that are end-to-end type-safe and adhere to OpenAPI standards
You can find the full documentation here.
@orpc/vue-query
Integration with Vue Query. Read the documentation for more information.
1export function Setup() {
2 const query = useQuery(orpc.planet.find.queryOptions({
3 input: { id: 123 }, // Specify input if needed
4 context: { cache: true }, // Provide client context if needed
5 // additional options...
6 }))
7
8 const query = useInfiniteQuery(orpc.planet.list.infiniteOptions({
9 input: (pageParam: number | undefined) => ({ limit: 10, offset: pageParam }),
10 context: { cache: true }, // Provide client context if needed
11 initialPageParam: undefined,
12 getNextPageParam: lastPage => lastPage.nextPageParam,
13 // additional options...
14 }))
15
16 const mutation = useMutation(orpc.planet.create.mutationOptions({
17 context: { cache: true }, // Provide client context if needed
18 // additional options...
19 }))
20
21 mutation.mutate({ name: 'Earth' })
22
23 const queryClient = useQueryClient()
24
25 // Invalidate all planet queries
26 queryClient.invalidateQueries({
27 queryKey: orpc.planet.key(),
28 })
29
30 // Invalidate only regular (non-infinite) planet queries
31 queryClient.invalidateQueries({
32 queryKey: orpc.planet.key({ type: 'query' })
33 })
34
35 // Invalidate the planet find query with id 123
36 queryClient.invalidateQueries({
37 queryKey: orpc.planet.find.key({ input: { id: 123 } })
38 })
39}
Distributed under the MIT License. See LICENSE for more information.
No vulnerabilities found.