Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
c7adf7d
docs(*): add parameter and result property tables to reference functi…
sukvvon Sep 30, 2026
d45f683
docs(*): link to the base type's properties when a parameter or resul…
sukvvon Sep 30, 2026
5293adc
Merge branch 'main' into docs/reference-add-parameter-and-result-prop…
sukvvon Sep 30, 2026
31ce818
Merge branch 'main' into docs/reference-add-parameter-and-result-prop…
sukvvon Oct 1, 2026
9f59740
Merge branch 'main' into docs/reference-add-parameter-and-result-prop…
sukvvon Oct 1, 2026
182896a
Merge branch 'main' into docs/reference-add-parameter-and-result-prop…
sukvvon Oct 3, 2026
ee06ab1
Merge remote-tracking branch 'origin/main' into docs/reference-add-pa…
sukvvon Oct 4, 2026
3b3c280
docs(framework/*/reference): regenerate reference docs
sukvvon Oct 4, 2026
f491489
Merge remote-tracking branch 'origin/main' into docs/reference-add-pa…
sukvvon Oct 5, 2026
7651f7c
docs(framework/*/reference): regenerate reference docs
sukvvon Oct 5, 2026
5b8eda1
chore(scripts/generate-docs): restore the 'dirname' import that the m…
sukvvon Oct 5, 2026
8242007
docs(framework/*/reference): regenerate reference docs
sukvvon Oct 5, 2026
b1728df
docs(scripts/generate-docs): label overloads in the overview with the…
sukvvon Oct 5, 2026
3e6573d
docs(framework/*/reference): regenerate reference docs
sukvvon Oct 5, 2026
8bda83a
docs(scripts/generate-docs): convert declared intersection types from…
sukvvon Oct 5, 2026
20a74d9
docs(framework/*/reference): regenerate reference docs
sukvvon Oct 5, 2026
11a1609
docs(scripts/generate-docs): reword a comment to avoid the unknown wo…
sukvvon Oct 5, 2026
31407b2
docs(scripts/generate-docs): skip a parameter table on overloaded pag…
sukvvon Oct 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions docs/framework/angular/reference/functions/dehydrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,32 @@ The client whose cache is dehydrated.
Controls which queries and mutations are included and how their data and errors
are transformed. Each option falls back to the client's `defaultOptions.dehydrate`.

<a id="options-properties"></a>

#### `options` properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="options-property-serializedata"></a> `serializeData?` | `TransformerFn` | Transforms a query's `data` before it is dehydrated. Useful for non-JSON-serializable data. |
| <a id="options-property-shoulddehydratemutation"></a> `shouldDehydrateMutation?` | (`mutation`: [`Mutation`](../classes/Mutation.md)) => `boolean` | Predicate to decide whether a given `Mutation` should be dehydrated. Defaults to `defaultShouldDehydrateMutation`. |
| <a id="options-property-shoulddehydratequery"></a> `shouldDehydrateQuery?` | (`query`: [`Query`](../classes/Query.md)) => `boolean` | Predicate to decide whether a given `Query` should be dehydrated. Defaults to `defaultShouldDehydrateQuery`. |
| <a id="options-property-shouldredacterrors"></a> `shouldRedactErrors?` | (`error`: `unknown`) => `boolean` | Predicate to decide whether a query's error should be redacted before dehydration. Errors are redacted (replaced with a generic `Error('redacted')`) unless this function is provided and returns `false` for the given error, in which case the original error is kept. |

## Returns

[`DehydratedState`](../interfaces/DehydratedState.md)

The dehydrated state, with the included `queries` and `mutations`.

<a id="result-properties"></a>

### Result properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="result-property-mutations"></a> `mutations` | `DehydratedMutation`[] | The dehydrated mutations, by default only the paused ones. |
| <a id="result-property-queries"></a> `queries` | `DehydratedQuery`[] | The dehydrated queries, by default only the successful ones. |

## Example

```ts
Expand Down
17 changes: 17 additions & 0 deletions docs/framework/angular/reference/functions/hydrate.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,30 @@ The client whose cache is restored into.

The dehydrated state, e.g. produced by `dehydrate` on the server.

<a id="dehydratedState-properties"></a>

#### `dehydratedState` properties

Built from [`DehydratedState`](../interfaces/DehydratedState.md#properties). See the type above for what it changes.

### options?

[`HydrateOptions`](../interfaces/HydrateOptions.md)

`defaultOptions` merged into every restored query and mutation (on top of the
client's `defaultOptions.hydrate`), and `deserializeData` to reverse `serializeData`.

<a id="options-properties"></a>

#### `options` properties

| Property | Type | Description |
| ------ | ------ | ------ |
| <a id="options-property-defaultoptions"></a> `defaultOptions?` | `object` | Options applied to the queries and mutations restored from the dehydrated state. |
| `defaultOptions.deserializeData?` | `TransformerFn` | Transforms a query's `data` after it is read from the dehydrated state, reversing `serializeData`. |
| `defaultOptions.mutations?` | [`MutationOptions`](../interfaces/MutationOptions.md)\<`unknown`, `Error`, `unknown`, `unknown`\> | Default options merged into every mutation restored from the dehydrated state. |
| `defaultOptions.queries?` | [`QueryOptions`](../interfaces/QueryOptions.md)\<`unknown`, `Error`, `unknown`, readonly `unknown`[], `never`\> | Default options merged into every query restored from the dehydrated state. |

## Returns

`void`
Expand Down
63 changes: 60 additions & 3 deletions docs/framework/angular/reference/functions/infiniteQueryOptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,26 @@ id: infiniteQueryOptions
title: infiniteQueryOptions
---

## Overview

```ts
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
```

- [`DefinedInitialDataInfiniteOptions` β†’ `DefinedInitialDataInfiniteOptions & QueryKeyWithDataTag`](#call-signature-1): You can generally pass everything to `infiniteQueryOptions` that you can also pass to `injectInfiniteQuery`. These options can be shared across functions and imperative APIs such as `queryClient.fetchInfiniteQuery`. `options.queryKey` is required and is the query key to generate options for.
- [`UnusedSkipTokenInfiniteOptions` β†’ `UnusedSkipTokenInfiniteOptions & QueryKeyWithDataTag`](#call-signature-2): You can generally pass everything to `infiniteQueryOptions` that you can also pass to `injectInfiniteQuery`. These options can be shared across functions and imperative APIs such as `queryClient.fetchInfiniteQuery`. `options.queryKey` is required and is the query key to generate options for.
- [`UndefinedInitialDataInfiniteOptions` β†’ `UndefinedInitialDataInfiniteOptions & QueryKeyWithDataTag`](#call-signature-3): You can generally pass everything to `infiniteQueryOptions` that you can also pass to `injectInfiniteQuery`. These options can be shared across functions and imperative APIs such as `queryClient.fetchInfiniteQuery`. `options.queryKey` is required and is the query key to generate options for.

See also: [Parameters](#parameters-summary) Β· [Returns](#returns-summary)

<a id="call-signature-1"></a>

## Call Signature

```ts
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & object & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData, unknown>, TError>;
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): DefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
```

Defined in: [packages/angular-query-experimental/src/infinite-query-options.ts:176](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/infinite-query-options.ts#L176)
Expand Down Expand Up @@ -51,6 +67,8 @@ The [DefinedInitialDataInfiniteOptions](../type-aliases/DefinedInitialDataInfini

### Returns

[`DefinedInitialDataInfiniteOptions`](../type-aliases/DefinedInitialDataInfiniteOptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> & [`QueryKeyWithDataTag`](../type-aliases/QueryKeyWithDataTag.md)\<`TQueryKey`, [`InfiniteData`](../interfaces/InfiniteData.md)\<`TQueryFnData`\>, `TError`\>

The same options object, typed so that `queryKey` carries the inferred data type.

### Remarks
Expand Down Expand Up @@ -94,10 +112,12 @@ export class Projects {
}
```

<a id="call-signature-2"></a>

## Call Signature

```ts
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): OmitKeyof<CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>, "queryFn"> & object & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData, unknown>, TError>;
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UnusedSkipTokenInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
```

Defined in: [packages/angular-query-experimental/src/infinite-query-options.ts:247](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/infinite-query-options.ts#L247)
Expand Down Expand Up @@ -140,6 +160,8 @@ The [UnusedSkipTokenInfiniteOptions](../type-aliases/UnusedSkipTokenInfiniteOpti

### Returns

[`UnusedSkipTokenInfiniteOptions`](../type-aliases/UnusedSkipTokenInfiniteOptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> & [`QueryKeyWithDataTag`](../type-aliases/QueryKeyWithDataTag.md)\<`TQueryKey`, [`InfiniteData`](../interfaces/InfiniteData.md)\<`TQueryFnData`\>, `TError`\>

The same options object, typed so that `queryKey` carries the inferred data type.

### Remarks
Expand Down Expand Up @@ -189,10 +211,12 @@ export class Comments {
}
```

<a id="call-signature-3"></a>

## Call Signature

```ts
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): CreateInfiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & object & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData, unknown>, TError>;
function infiniteQueryOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>(options: UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam>): UndefinedInitialDataInfiniteOptions<TQueryFnData, TError, TData, TQueryKey, TPageParam> & QueryKeyWithDataTag<TQueryKey, InfiniteData<TQueryFnData>, TError>;
```

Defined in: [packages/angular-query-experimental/src/infinite-query-options.ts:318](https://github.com/TanStack/query/blob/main/packages/angular-query-experimental/src/infinite-query-options.ts#L318)
Expand Down Expand Up @@ -235,6 +259,8 @@ The [UndefinedInitialDataInfiniteOptions](../type-aliases/UndefinedInitialDataIn

### Returns

[`UndefinedInitialDataInfiniteOptions`](../type-aliases/UndefinedInitialDataInfiniteOptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> & [`QueryKeyWithDataTag`](../type-aliases/QueryKeyWithDataTag.md)\<`TQueryKey`, [`InfiniteData`](../interfaces/InfiniteData.md)\<`TQueryFnData`\>, `TError`\>

The same options object, typed so that `queryKey` carries the inferred data type.

### Remarks
Expand Down Expand Up @@ -283,3 +309,34 @@ export class Comments {
readonly commentsQuery = injectInfiniteQuery(() => commentsOptions(this.postId()))
}
```

<a id="parameters-summary"></a>

## Parameters

### options

[`UndefinedInitialDataInfiniteOptions`](../type-aliases/UndefinedInitialDataInfiniteOptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\>

The [UndefinedInitialDataInfiniteOptions](../type-aliases/UndefinedInitialDataInfiniteOptions.md) to use β€” everything you can pass to
`injectInfiniteQuery`.

<a id="options-properties"></a>

#### `options` properties

Built from [`CreateInfiniteQueryOptions`](../interfaces/CreateInfiniteQueryOptions.md#properties). See the type above for what it changes.

<a id="returns-summary"></a>

## Returns

[`UndefinedInitialDataInfiniteOptions`](../type-aliases/UndefinedInitialDataInfiniteOptions.md)\<`TQueryFnData`, `TError`, `TData`, `TQueryKey`, `TPageParam`\> & [`QueryKeyWithDataTag`](../type-aliases/QueryKeyWithDataTag.md)\<`TQueryKey`, [`InfiniteData`](../interfaces/InfiniteData.md)\<`TQueryFnData`\>, `TError`\>

The same options object, typed so that `queryKey` carries the inferred data type.

<a id="result-properties"></a>

### Result properties

Built from [`CreateInfiniteQueryOptions`](../interfaces/CreateInfiniteQueryOptions.md#properties), [`QueryKeyWithDataTag`](../type-aliases/QueryKeyWithDataTag.md#properties). See the type above for what it changes.
Loading
Loading