Skip to content

Commit f7af52d

Browse files
authored
Merge branch 'main' into fix/invalidate-query-immediately
2 parents b1ab5cb + 4977296 commit f7af52d

File tree

153 files changed

+1729
-1996
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

153 files changed

+1729
-1996
lines changed

.all-contributorsrc

Lines changed: 0 additions & 238 deletions
This file was deleted.

docs/framework/angular/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Most core web frameworks **do not** come with an opinionated way of fetching or
2323

2424
While most traditional state management libraries are great for working with client state, they are **not so great at working with async or server state**. This is because **server state is totally different**. For starters, server state:
2525

26-
- Is persisted remotely in a location you do not control or own
26+
- Is persisted remotely in a location you may not control or own
2727
- Requires asynchronous APIs for fetching and updating
2828
- Implies shared ownership and can be changed by other people without your knowledge
2929
- Can potentially become "out of date" in your applications if you're not careful
@@ -58,7 +58,7 @@ On a more technical note, Angular Query will likely:
5858

5959
In the example below, you can see Angular Query in its most basic and simple form being used to fetch the GitHub stats for the TanStack Query GitHub project itself:
6060

61-
[Open in CodeSandbox](https://codesandbox.io/s/github/tanstack/query/tree/main/examples/angular/simple)
61+
[Open in StackBlitz](https://stackblitz.com/github/TanStack/query/tree/main/examples/angular/simple)
6262

6363
```angular-ts
6464
import { AngularQueryDevtools } from '@tanstack/angular-query-devtools-experimental'
@@ -114,4 +114,4 @@ type Response = {
114114

115115
## You talked me into it, so what now?
116116

117-
- Learn Angular Query at your own pace with our amazingly thorough [Walkthrough Guide](../installation) and [API Reference](../reference/injectQuery)
117+
- Learn Angular Query at your own pace with our amazingly thorough [Walkthrough Guide](../installation) and [API Reference](../reference/functions/injectquery)

docs/framework/react/guides/query-cancellation.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,7 @@ return (
187187
```
188188

189189
[//]: # 'Example7'
190+
191+
## Limitations
192+
193+
Cancelation does not work when working with `Suspense` hooks: `useSuspenseQuery`, `useSuspenseQueries` and `useSuspenseInfiniteQuery`.

docs/framework/react/reference/useSuspenseInfiniteQuery.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,7 @@ Same object as [useInfiniteQuery](../useInfiniteQuery), except that:
2424
- `isPlaceholderData` is missing
2525
- `status` is always `success`
2626
- the derived flags are set accordingly.
27+
28+
**Caveat**
29+
30+
[Cancelation](../guides/query-cancellation.md) does not work.

docs/framework/react/reference/useSuspenseQueries.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ Same structure as [useQueries](../useQueries), except that for each `query`:
2525
- `status` is always `success`
2626
- the derived flags are set accordingly.
2727

28-
**Caveat**
28+
**Caveats**
2929

3030
Keep in mind that the component will only re-mount after **all queries** have finished loading. Hence, if a query has gone stale in the time it took for all the queries to complete, it will be fetched again at re-mount. To avoid this, make sure to set a high enough `staleTime`.
31+
32+
[Cancelation](../guides/query-cancellation.md) does not work.

docs/framework/react/reference/useSuspenseQuery.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ Same object as [useQuery](../useQuery), except that:
2323
- `isPlaceholderData` is missing
2424
- `status` is always `success`
2525
- the derived flags are set accordingly.
26+
27+
**Caveat**
28+
29+
[Cancelation](../guides/query-cancellation.md) does not work.

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ export default [
3636
},
3737
},
3838
],
39-
'@typescript-eslint/ban-types': 'off',
4039
'@typescript-eslint/no-empty-function': 'off',
40+
'@typescript-eslint/no-unsafe-function-type': 'off',
4141
'no-case-declarations': 'off',
4242
},
4343
},

examples/angular/basic/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^17.3.12",
1515
"@angular/platform-browser": "^17.3.12",
1616
"@angular/platform-browser-dynamic": "^17.3.12",
17-
"@tanstack/angular-query-experimental": "^5.52.0",
17+
"@tanstack/angular-query-experimental": "^5.53.1",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
2020
"zone.js": "^0.14.8"
@@ -23,7 +23,7 @@
2323
"@angular-devkit/build-angular": "^17.3.8",
2424
"@angular/cli": "^17.3.8",
2525
"@angular/compiler-cli": "^17.3.12",
26-
"@tanstack/angular-query-devtools-experimental": "^5.52.0",
26+
"@tanstack/angular-query-devtools-experimental": "^5.53.1",
2727
"typescript": "5.3.3"
2828
}
2929
}

examples/angular/infinite-query-with-max-pages/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"@angular/core": "^17.3.12",
1515
"@angular/platform-browser": "^17.3.12",
1616
"@angular/platform-browser-dynamic": "^17.3.12",
17-
"@tanstack/angular-query-experimental": "^5.52.0",
17+
"@tanstack/angular-query-experimental": "^5.53.1",
1818
"rxjs": "^7.8.1",
1919
"tslib": "^2.6.3",
2020
"zone.js": "^0.14.8"
@@ -23,7 +23,7 @@
2323
"@angular-devkit/build-angular": "^17.3.8",
2424
"@angular/cli": "^17.3.8",
2525
"@angular/compiler-cli": "^17.3.12",
26-
"@tanstack/angular-query-devtools-experimental": "^5.52.0",
26+
"@tanstack/angular-query-devtools-experimental": "^5.53.1",
2727
"typescript": "5.3.3"
2828
}
2929
}

examples/angular/router/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@angular/platform-browser": "^17.3.12",
1616
"@angular/platform-browser-dynamic": "^17.3.12",
1717
"@angular/router": "^17.3.12",
18-
"@tanstack/angular-query-experimental": "^5.52.0",
18+
"@tanstack/angular-query-experimental": "^5.53.1",
1919
"rxjs": "^7.8.1",
2020
"tslib": "^2.6.3",
2121
"zone.js": "^0.14.8"
@@ -24,7 +24,7 @@
2424
"@angular-devkit/build-angular": "^17.3.8",
2525
"@angular/cli": "^17.3.8",
2626
"@angular/compiler-cli": "^17.3.12",
27-
"@tanstack/angular-query-devtools-experimental": "^5.52.0",
27+
"@tanstack/angular-query-devtools-experimental": "^5.53.1",
2828
"typescript": "5.3.3"
2929
}
3030
}

examples/angular/router/src/app/components/post.component.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,7 @@ import {
66
numberAttribute,
77
} from '@angular/core'
88
import { RouterLink } from '@angular/router'
9-
import {
10-
injectQuery,
11-
injectQueryClient,
12-
} from '@tanstack/angular-query-experimental'
9+
import { injectQuery } from '@tanstack/angular-query-experimental'
1310
import { lastValueFrom } from 'rxjs'
1411
import { PostsService } from '../services/posts-service'
1512

@@ -22,7 +19,6 @@ import { PostsService } from '../services/posts-service'
2219
})
2320
export default class PostComponent {
2421
#postsService = inject(PostsService)
25-
queryClient = injectQueryClient()
2622

2723
postId = input.required({
2824
transform: numberAttribute,

examples/angular/simple/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"@angular/platform-browser": "^17.3.12",
1616
"@angular/platform-browser-dynamic": "^17.3.12",
1717
"@angular/router": "^17.3.12",
18-
"@tanstack/angular-query-experimental": "^5.52.0",
18+
"@tanstack/angular-query-experimental": "^5.53.1",
1919
"rxjs": "^7.8.1",
2020
"tslib": "^2.6.3",
2121
"zone.js": "^0.14.8"
@@ -24,7 +24,7 @@
2424
"@angular-devkit/build-angular": "^17.3.8",
2525
"@angular/cli": "^17.3.8",
2626
"@angular/compiler-cli": "^17.3.12",
27-
"@tanstack/angular-query-devtools-experimental": "^5.52.0",
27+
"@tanstack/angular-query-devtools-experimental": "^5.53.1",
2828
"typescript": "5.3.3"
2929
}
3030
}

0 commit comments

Comments
 (0)