@orpc/vue-colada provides utilities for Pinia Colada — the official data-fetching layer for Pinia in Vue. It generates fully typed useQuery and useMutation options from your oRPC client.
Installation
Setup
useQuery
Reactive inputs
Inputs and context acceptMaybeRefOrGetter — you can pass a ref or a getter function and the query will re-run when the value changes:
useMutation
Cache invalidation with key()
key() generates a Pinia Colada EntryKey for use with cache operations:
Calling the procedure directly
Each procedure utils also exposescall — the raw client function:
queryOptions and mutationOptions structure
Under the hood,queryOptions() returns a Pinia Colada UseQueryOptions object with key and query pre-populated:
mutationOptions() returns a UseMutationOptions object:
