Open History to see the last commit
1---
2id: QueryResource
3title: QueryResource
4---
5β
6Defined in: [packages/angular-query/src/query-resource.ts:6](https://github.com/TanStack/query/blob/main/packages/angular-query/src/query-resource.ts#L6)
7β
8## Extends
9β
10- `Resource`\<`TValue`\>
11β
12## Type Parameters
13β
14### TValue
15β
16`TValue`
17β
18## Properties
19β
20| Property | Modifier | Type | Description | Overrides |
21| ------ | ------ | ------ | ------ | ------ |
22| <a id="error"></a> `error` | `readonly` | `Signal`\<`Error` \| `undefined`\> | When in the `error` state, this returns the last known error from the `Resource`. | - |
23| <a id="isloading"></a> `isLoading` | `readonly` | `Signal`\<`boolean`\> | Whether this resource is loading a new value (or reloading the existing one). | - |
24| <a id="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. | - |
25| <a id="snapshot"></a> `snapshot` | `readonly` | `Signal`\<`ResourceSnapshot`\<`TValue`\>\> | The current query state as a single snapshot. | `Resource.snapshot` |
26| <a id="status"></a> `status` | `readonly` | `Signal`\<`ResourceStatus`\> | The current status of the `Resource`, which describes what the resource is currently doing and what can be expected of its `value`. | - |
27| <a id="value"></a> `value` | `readonly` | `Signal`\<`TValue`\> | The current value of the `Resource`, or throws an error if the resource is in an error state. | - |
28β
29## Methods
30β
31### hasValue()
32β
33#### Call Signature
34β
35```ts
36hasValue(this: TValue extends undefined ? QueryResource<TValue> : never): this is Resource<Exclude<TValue, undefined>>;
37```
38β
39Defined in: node\_modules/.pnpm/@angular+core@22.1.6\_@angular+compiler@22.1.6\_rxjs@7.8.2\_zone.js@0.16.1/node\_modules/@angular/core/types/\_api-chunk.d.ts:186
40β
41Whether this resource has a valid current value.
42β
43This function is reactive.
44β
45##### Parameters
46β
47###### this
48β
49`TValue` *extends* `undefined` ? `QueryResource`\<`TValue`\> : `never`
50β
51##### Returns
52β
53`this is Resource<Exclude<TValue, undefined>>`
54β
55##### Inherited from
56β
57```ts
58Resource.hasValue
59```
60β
61#### Call Signature
62β
63```ts
64hasValue(): boolean;
65```
66β
67Defined in: node\_modules/.pnpm/@angular+core@22.1.6\_@angular+compiler@22.1.6\_rxjs@7.8.2\_zone.js@0.16.1/node\_modules/@angular/core/types/\_api-chunk.d.ts:187
68β
69##### Returns
70β
71`boolean`
72β
73##### Inherited from
74β
75```ts
76Resource.hasValue
77```