Skip to content
Source
Sign inSign up
TanStack/query
Open History to see the last commit

QueryResource.md

27 lines1005 Bytes

1---
2id: QueryResource
3title: QueryResource
4---
5​
6<!-- DO NOT EDIT: this page is autogenerated from the type comments -->
7​
8Defined in: [packages/angular-query/src/query-resource.ts:9](https://github.com/TanStack/query/blob/main/packages/angular-query/src/query-resource.ts#L9)
9​
10A query-backed Angular Resource that also exposes an atomic state snapshot.
11​
12## Extends
13​
14- `Resource`\<`TValue`\>
15​
16## Type Parameters
17​
18### TValue
19​
20`TValue`
21​
22## Properties
23​
24| Property | Modifier | Type | Description | Overrides |
25| ------ | ------ | ------ | ------ | ------ |
26| <a id="property-reload"></a> `reload` | `public` | () => `boolean` | Requests a new query fetch only when the current query data is stale. Used for compatibility with Angular APIs that might want to reload a resource, like Signal Forms' validateAsync resource interface. | - |
27| <a id="property-snapshot"></a> `snapshot` | `readonly` | `Signal`\<`ResourceSnapshot`\<`TValue`\>\> | The current query state as a single snapshot. | `Resource.snapshot` |