Skip to main content
Execute multiple queries in parallel with the useQueries composable. It returns an array of query results that are all reactive and managed independently.

Signature

Parameters

object
required
Configuration object for multiple queries.
QueryClient
Custom QueryClient instance. If not provided, uses the client from context.

Returns

Ref
Reactive ref containing array of query results (or combined result if combine is provided).When not using combine, each element contains:

Type Parameters

  • T - Tuple type representing the array of query options
  • TCombinedResult - Type of combined result (defaults to UseQueriesResults<T>)

Examples

Basic Usage

With TypeScript

Dynamic Queries

Combining Results

Conditional Queries

Different Query Options

Accessing Individual Results

Refetch Individual Queries

Type-Safe Queries Array

Notes

Each query in the array is tracked independently. Changing one query’s parameters will only refetch that specific query.
Use the combine option to derive custom data structures from the results array, such as aggregating loading states or merging data.
When using a function for the queries option, make sure it’s reactive (uses Vue refs/computed). Static arrays won’t react to changes.